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

sdcadm update: error: imgapi client error (ImageUuidAlreadyExists) when running sdcadm update docker #29

Open
jussisallinen opened this issue Nov 24, 2016 · 1 comment

Comments

@jussisallinen
Copy link

jussisallinen commented Nov 24, 2016

sdcadm 1.14.0 (master-20161124T190233Z-gf6d1f0c)

sdcadm update docker -y

Finding candidate update images for the "docker" service.
Using channel release

This update will make the following changes:
download 1 image (177 MiB):
image 9fb2ea90-b1cf-11e6-a586-4b418000a9c5
(docker@release-20161124-20161123T224055Z-g2c4c350)
update "docker" service to image 9fb2ea90-b1cf-11e6-a586-4b418000a9c5
(docker@release-20161124-20161123T224055Z-g2c4c350)

Create work dir: /var/sdcadm/updates/20161124T202908Z
Downloading image 9fb2ea90-b1cf-11e6-a586-4b418000a9c5
(docker@release-20161124-20161123T224055Z-g2c4c350)
Error importing image 9fb2ea90-b1cf-11e6-a586-4b418000a9c5
(docker@release-20161124-20161123T224055Z-g2c4c350)
Update error: EXCEPTION: SDCClientError: SDCClientError: imgapi client error (ImageUuidAlreadyExists): image uuid "9fb2ea90-b1cf-11e6-a586-4b418000a9c5" already exists; caused by ImageUuidAlreadyExistsError: image uuid "9fb2ea90-b1cf-11e6-a586-4b418000a9c5" already exists
at /opt/smartdc/sdcadm/lib/procedures/download-images.js:112:37
at Backoff. (/opt/smartdc/sdcadm/node_modules/sdc-clients/lib/imgapi.js:1044:13)
at Backoff.EventEmitter.emit (events.js:95:17)
at Backoff.backoff (/opt/smartdc/sdcadm/node_modules/backoff/lib/backoff.js:41:14)
at /opt/smartdc/sdcadm/node_modules/sdc-clients/lib/imgapi.js:1018:34
at parseResponse (/opt/smartdc/sdcadm/node_modules/sdc-clients/node_modules/restify/lib/clients/json_client.js:84:9)
at IncomingMessage.done (/opt/smartdc/sdcadm/node_modules/sdc-clients/node_modules/restify/lib/clients/string_client.js:151:17)
at IncomingMessage.g (events.js:180:16)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
Caused by: EXCEPTION: RestError: ImageUuidAlreadyExistsError: image uuid "9fb2ea90-b1cf-11e6-a586-4b418000a9c5" already exists
at parseResponse (/opt/smartdc/sdcadm/node_modules/sdc-clients/node_modules/restify/lib/clients/json_client.js:67:23)
at IncomingMessage.done (/opt/smartdc/sdcadm/node_modules/sdc-clients/node_modules/restify/lib/clients/string_client.js:151:17)
at IncomingMessage.g (events.js:180:16)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
sdcadm update: error: imgapi client error (ImageUuidAlreadyExists): image uuid "9fb2ea90-b1cf-11e6-a586-4b418000a9c5" already exists

imgadm list | grep docker
269cfa9a-b032-11e6-a6b7-cba1698b18f4 docker master-20161121T212616Z-g2c4c350 smartos zone-dataset 2016-11-21

@jussisallinen
Copy link
Author

jussisallinen commented Nov 24, 2016

Output from 2nd run:

Using channel release

This update will make the following changes:
update "docker" service to image 9fb2ea90-b1cf-11e6-a586-4b418000a9c5
(docker@release-20161124-20161123T224055Z-g2c4c350)

Create work dir: /var/sdcadm/updates/20161124T205119Z
Updating image for SAPI service "docker"
service uuid: 566d6bc2-327f-49ce-a64f-387321672c54
"docker" VM already has a delegate dataset
Installing image 9fb2ea90-b1cf-11e6-a586-4b418000a9c5
(docker@release-20161124-20161123T224055Z-g2c4c350)

sdcadm update: error: error importing VM image 9fb2ea90-b1cf-11e6-a586-4b418000a9c5:
argv: ["/usr/sbin/imgadm","import","-q","9fb2ea90-b1cf-11e6-a586-4b418000a9c5"]
exit status: 1
stdout:
Importing 9fb2ea90-b1cf-11e6-a586-4b418000a9c5 (docker@release-20161124-20161123T224055Z-g2c4c350) from "http://not.disclosed.url"
Gather image 9fb2ea90-b1cf-11e6-a586-4b418000a9c5 ancestry
Image 18b094b0-eb01-11e5-80c1-175dac7ddf02 already installed
Must download and install 1 image (177.3 MiB)
Aborting ()
stderr:
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":20,"opts":{},"args":["import","-q","9fb2ea90-b1cf-11e6-a586-4b418000a9c5"],"cli":true,"msg":"cli init","time":"2016-11-24T20:40:43.314Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":30,"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","arg":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","msg":"image-id validated","time":"2016-11-24T20:40:43.325Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":30,"importInfo":{"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","manifest":{"v":2,"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","owner":"930896af-bf8c-48d4-885c-6573a94b1853","name":"docker","version":"release-20161124-20161123T224055Z-g2c4c350","state":"active","disabled":false,"public":false,"published_at":"2016-11-23T22:52:06.341Z","type":"zone-dataset","os":"smartos","files":[{"sha1":"bfad2264d2374e94a33ed9798a6246cf201bc796","size":185980840,"compression":"gzip"}],"description":"SDC","requirements":{"min_platform":{"7.0":"20141030T081701Z"},"networks":[{"name":"net0","description":"admin"}]},"origin":"18b094b0-eb01-11e5-80c1-175dac7ddf02","tags":{"smartdc_service":true}},"source":{"type":"imgapi","url":"http://inot.disclosed.url"}},"arg":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","msg":"found source for import","time":"2016-11-24T20:40:43.456Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":20,"err":null,"ancestry":[{"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","manifest":{"v":2,"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","owner":"930896af-bf8c-48d4-885c-6573a94b1853","name":"docker","version":"release-20161124-20161123T224055Z-g2c4c350","state":"active","disabled":false,"public":false,"published_at":"2016-11-23T22:52:06.341Z","type":"zone-dataset","os":"smartos","files":[{"sha1":"bfad2264d2374e94a33ed9798a6246cf201bc796","size":185980840,"compression":"gzip"}],"description":"SDC","requirements":{"min_platform":{"7.0":"20141030T081701Z"},"networks":[{"name":"net0","description":"admin"}]},"origin":"18b094b0-eb01-11e5-80c1-175dac7ddf02","tags":{"smartdc_service":true}}},{"uuid":"18b094b0-eb01-11e5-80c1-175dac7ddf02","manifest":{"v":2,"uuid":"18b094b0-eb01-11e5-80c1-175dac7ddf02","owner":"930896af-bf8c-48d4-885c-6573a94b1853","name":"sdc-minimal-multiarch-lts","version":"15.4.1","state":"active","disabled":false,"public":false,"published_at":"2016-03-15T22:58:10Z","type":"zone-dataset","os":"smartos","files":[{"sha1":"dc7cd3e93c821910a2ca1728da47994808dd1e55","size":94912226,"compression":"gzip"}],"description":"A copy of the multiarch image for internal use by SmartDataCenter core images. This is only useful for development of SDC and Manta.","homepage":"https://docs.joyent.com/images/smartos/minimal","requirements":{"min_platform":{"7.0":"20141030T081701Z"},"networks":[{"name":"net0","description":"public"}]},"tags":{"smartdc":"true"}}}],"msg":"img ancestry","time":"2016-11-24T20:40:43.576Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":20,"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","lockPath":"/var/run/img.9fb2ea90-b1cf-11e6-a586-4b418000a9c5.import.lock","msg":"acquiring lock","time":"2016-11-24T20:40:43.719Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":20,"lockPath":"/var/run/img.9fb2ea90-b1cf-11e6-a586-4b418000a9c5.import.lock","uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","msg":"acquired lock","time":"2016-11-24T20:40:43.721Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":30,"irec":{"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","importInfo":{"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","manifest":{"v":2,"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","owner":"930896af-bf8c-48d4-885c-6573a94b1853","name":"docker","version":"release-20161124-20161123T224055Z-g2c4c350","state":"active","disabled":false,"public":false,"published_at":"2016-11-23T22:52:06.341Z","type":"zone-dataset","os":"smartos","files":[{"sha1":"bfad2264d2374e94a33ed9798a6246cf201bc796","size":185980840,"compression":"gzip"}],"description":"SDC","requirements":{"min_platform":{"7.0":"20141030T081701Z"},"networks":[{"name":"net0","description":"admin"}]},"origin":"18b094b0-eb01-11e5-80c1-175dac7ddf02","tags":{"smartdc_service":true}},"source":{"type":"imgapi","url":"http://not.disclosed.url"}},"imgMeta":{"manifest":"[Circular]","size":185980840,"checksum":"sha1:bfad2264d2374e94a33ed9798a6246cf201bc796"}},"msg":"got irec.imgMeta","time":"2016-11-24T20:40:43.778Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":30,"irecs":[{"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","importInfo":{"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","manifest":{"v":2,"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","owner":"930896af-bf8c-48d4-885c-6573a94b1853","name":"docker","version":"release-20161124-20161123T224055Z-g2c4c350","state":"active","disabled":false,"public":false,"published_at":"2016-11-23T22:52:06.341Z","type":"zone-dataset","os":"smartos","files":[{"sha1":"bfad2264d2374e94a33ed9798a6246cf201bc796","size":185980840,"compression":"gzip"}],"description":"SDC","requirements":{"min_platform":{"7.0":"20141030T081701Z"},"networks":[{"name":"net0","description":"admin"}]},"origin":"18b094b0-eb01-11e5-80c1-175dac7ddf02","tags":{"smartdc_service":true}},"source":{"type":"imgapi","url":"http://not.disclosed.url"}},"imgMeta":{"manifest":"[Circular]","size":185980840,"checksum":"sha1:bfad2264d2374e94a33ed9798a6246cf201bc796"}}],"numInAncestry":2,"numToInstall":1,"msg":"irecs to download and install","time":"2016-11-24T20:40:43.802Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":30,"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","msg":"download image","time":"2016-11-24T20:40:43.802Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":30,"err":{"message":"","name":"InternalServerError","stack":"InternalServerError\n at ClientRequest.onResponse (/usr/img/node_modules/restify/lib/clients/http_client.js:161:26)\n at ClientRequest.g (events.js:180:16)\n at ClientRequest.EventEmitter.emit (events.js:95:17)\n at HTTPParser.parserOnIncomingClient (http.js:1688:21)\n at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)\n at Socket.socketOnData (http.js:1583:20)\n at TCP.onread (net.js:530:27)"},"msg":"abort download and install","time":"2016-11-24T20:42:43.815Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":20,"unlockInfo":{"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","lockPath":"/var/run/img.9fb2ea90-b1cf-11e6-a586-4b418000a9c5.import.lock"},"msg":"releasing lock","time":"2016-11-24T20:42:43.815Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":20,"msg":"done downloads","time":"2016-11-24T20:42:43.815Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":20,"unlockInfo":{"uuid":"9fb2ea90-b1cf-11e6-a586-4b418000a9c5","lockPath":"/var/run/img.9fb2ea90-b1cf-11e6-a586-4b418000a9c5.import.lock"},"msg":"released lock","time":"2016-11-24T20:42:43.816Z","v":0}
{"name":"imgadm","req_id":"ff008c1b-8202-4351-9a0c-f7c306ca34f3","hostname":"headnode","pid":81857,"level":20,"subcmd":"import","exitStatus":1,"cli":true,"msg":"cli exit","time":"2016-11-24T20:42:43.816Z","v":0}
imgadm import: error (InternalServerError): InternalServerError
at ClientRequest.onResponse (/usr/img/node_modules/restify/lib/clients/http_client.js:161:26)
at ClientRequest.g (events.js:180:16)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at HTTPParser.parserOnIncomingClient (http.js:1688:21)
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
at Socket.socketOnData (http.js:1583:20)
at TCP.onread (net.js:530:27)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant