Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup fails with the local volume instance + shared volume #717

Open
unakatsuo opened this issue Sep 1, 2015 · 0 comments
Open

Backup fails with the local volume instance + shared volume #717

unakatsuo opened this issue Sep 1, 2015 · 0 comments

Comments

@unakatsuo
Copy link
Contributor

PUT /insta/ces/i-xxxx/backup?all=true performs to take backup for all associated disks. but it fails with 500 and the instance can not be terminated because the validation for those incomplete backup objects fails.

$ MUSSEL_LOGLEVEL=debug /opt/axsh/wakame-vdc/client/mussel/mussel.sh instance create --host-node-id=hn-psv0011temp --ha_enabled=true --image-id=wmi-centos1d64 --ssh-key_id=ssh-een2k7jq --hypervisor=kvm --cpu-cores=1 --memory-size=128 --volumes[0][size]=10 --volumes[0][volume_type]=shared --vifs=./vif
$ curl -fsSkL -H X_VDC_ACCOUNT_UUID:a-shpoolxx --dump-header - -X POST --data-urlencode cpu_cores=1 --data-urlencode hypervisor=kvm --data-urlencode image_id=wmi-centos1d64 --data-urlencode memory_size=128 --data-urlencode ssh_key_id=ssh-een2k7jq --data-urlencode vifs@./vif --data-urlencode host_node_id=hn-psv0011temp --data-urlencode ha_enabled=true --data-urlencode volumes[0][size]=10 --data-urlencode volumes[0][volume_type]=shared http://127.0.0.1:9001/api/12.03/instances.yml
HTTP/1.1 200 OK
Date: Tue, 27 Jan 2015 10:27:33 GMT
Status: 200 OK
Connection: close
Content-Type: text/yaml;charset=utf-8
Content-Length: 862
X-Content-Type-Options: nosniff
X-VDC-Request-ID: 51f966e5170dae4e232b0d2f3a8582c5bb25785d

---
:id: i-ab4v04fk
:account_id: a-shpoolxx
:host_node: hn-psv0011temp
:cpu_cores: 1
:memory_size: 128
:arch: x86_64
:image_id: wmi-centos1d64
:created_at: 2015-01-27 10:27:33.000000000 Z
:updated_at: 2015-01-27 10:27:33.135464393 Z
:terminated_at:
:deleted_at:
:state: scheduling
:status: init
:ssh_key_pair:
  :uuid: ssh-een2k7jq
  :display_name: ''
:volume:
- :vol_id: vol-hgv9kdqj
  :state: scheduling
- :vol_id: vol-tojiw74x
  :state: scheduling
:vif: []
:hostname: ab4v04fk
:ha_enabled: 1
:hypervisor: kvm
:display_name: ''
:service_type: std
:monitoring:
  :enabled: false
  :mail_address: []
  :items: {}
:labels:
- :resource_uuid: i-ab4v04fk
  :name: monitoring.enabled
  :value_type: 1
  :value: 'false'
  :created_at: 2015-01-27 10:27:33.000000000 Z
  :updated_at: 2015-01-27 10:27:33.000000000 Z
:boot_volume_id: vol-hgv9kdqj
:encrypted_password:
$ MUSSEL_DEBUG=debug /opt/axsh/wakame-vdc/client/mussel/mussel.sh instance show i-ab4v04fk          ---
:id: i-ab4v04fk
:account_id: a-shpoolxx
:host_node: hn-psv0011temp
:cpu_cores: 1
:memory_size: 128
:arch: x86_64
:image_id: wmi-centos1d64
:created_at: 2015-01-27 10:27:33.000000000 Z
:updated_at: 2015-01-27 10:28:00.000000000 Z
:terminated_at:
:deleted_at:
:state: running
:status: online
:ssh_key_pair:
  :uuid: ssh-een2k7jq
  :display_name: ''
:volume:
- :vol_id: vol-hgv9kdqj
  :state: attached
- :vol_id: vol-tojiw74x
  :state: attached
:vif:
- :vif_id: vif-5s2h0k6n
  :network_id: nw-pub
  :ipv4:
    :address: 10.113.9.3
    :nat_address:
  :security_groups:
  - sg-jz7wqlmy
:hostname: ab4v04fk
:ha_enabled: 1
:hypervisor: kvm
:display_name: ''
:service_type: std
:monitoring:
  :enabled: false
  :mail_address: []
  :items: {}
:labels:
- :resource_uuid: i-ab4v04fk
  :name: monitoring.enabled
  :value_type: 1
  :value: 'false'
  :created_at: 2015-01-27 10:27:33.000000000 Z
  :updated_at: 2015-01-27 10:27:33.000000000 Z
:boot_volume_id: vol-hgv9kdqj
:encrypted_password:
$ MUSSEL_DEBUG=debug /opt/axsh/wakame-vdc/client/mussel/mussel.sh instance backup i-ab4v04fk
curl: (22) The requested URL returned error: 400 Bad Request
[axsh-deploy@dcmgr01-02-temp worklog.20150127]$ MUSSEL_DEBUG=debug /opt/axsh/wakame-vdc/client/mussel/mussel.sh instance poweroff i-ab4v04fk

---
:instance_id: i-ab4v04fk
[axsh-deploy@dcmgr01-02-temp worklog.20150127]$ MUSSEL_DEBUG=debug /opt/axsh/wakame-vdc/client/mussel/mussel.sh instance backup i-ab4v04fk

---
:instance_id: i-ab4v04fk
:image_id: wmi-4y67vwou
:backup_object_ids:
- bo-l3pjng5y
$ MUSSEL_DEBUG=debug /opt/axsh/wakame-vdc/client/mussel/mussel.sh instance backup i-ab4v04fk --all=true
curl: (22) The requested URL returned error: 500 Internal Server Error

dcmgr.log

127.0.0.1 - - [27/Jan/2015:20:24:42 +0900] "PUT /api/12.03/instances/i-ab4v04fk/backup.yml HTTP/1.1" 200 87 0.1187
NoMethodError - undefined method `canonical_uuid' for nil:NilClass:
        /opt/axsh/wakame-vdc/dcmgr/lib/dcmgr/endpoints/12.03/instances.rb:637:in `block (3 levels) in load_namespace'
        /opt/axsh/wakame-vdc/dcmgr/vendor/bundle/ruby/2.0.0/gems/sequel-3.47.0/lib/sequel/database/transactions.rb:181:in `call'
        /opt/axsh/wakame-vdc/dcmgr/vendor/bundle/ruby/2.0.0/gems/sequel-3.47.0/lib/sequel/database/transactions.rb:181:in `block in after_transact
ion_commit'
        /opt/axsh/wakame-vdc/dcmgr/vendor/bundle/ruby/2.0.0/gems/sequel-3.47.0/lib/sequel/database/transactions.rb:181:in `each'
        /opt/axsh/wakame-vdc/dcmgr/vendor/bundle/ruby/2.0.0/gems/sequel-3.47.0/lib/sequel/database/transactions.rb:181:in `after_transaction_commi
t'
        /opt/axsh/wakame-vdc/dcmgr/vendor/bundle/ruby/2.0.0/gems/sequel-3.47.0/lib/sequel/database/transactions.rb:293:in `remove_transaction'
        /opt/axsh/wakame-vdc/dcmgr/vendor/bundle/ruby/2.0.0/gems/sequel-3.47.0/lib/sequel/database/transactions.rb:150:in `ensure in _transaction'
        /opt/axsh/wakame-vdc/dcmgr/vendor/bundle/ruby/2.0.0/gems/sequel-3.47.0/lib/sequel/database/transactions.rb:150:in `_transaction'
        /opt/axsh/wakame-vdc/dcmgr/vendor/bundle/ruby/2.0.0/gems/sequel-3.47.0/lib/sequel/database/transactions.rb:102:in `block in transaction'
        /opt/axsh/wakame-vdc/dcmgr/vendor/bundle/ruby/2.0.0/gems/sequel-3.47.0/lib/sequel/database/connecting.rb:236:in `block in synchronize'
        /opt/axsh/wakame-vdc/dcmgr/vendor/bundle/ruby/2.0.0/gems/sequel-3.47.0/lib/sequel/connection_pool/threaded.rb:104:in `hold'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants