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

imgadm is broken with dsapi servers. #190

Closed
ilc opened this issue Mar 24, 2013 · 3 comments
Closed

imgadm is broken with dsapi servers. #190

ilc opened this issue Mar 24, 2013 · 3 comments

Comments

@ilc
Copy link

@ilc ilc commented Mar 24, 2013

/usr/img/node_modules/assert-plus/assert.js:44
                        throw new assert.AssertionError({
                              ^
AssertionError: ensureActive (boolean) is required
    at IMGADM.sourcesGet (/usr/img/lib/imgadm.js:1100:12)
    at updateImage (/usr/img/lib/imgadm.js:1613:14)
    at async.forEachSeries.iterate (/usr/img/node_modules/async/lib/async.js:108:13)
    at Object.async.forEachSeries (/usr/img/node_modules/async/lib/async.js:124:9)
    at IMGADM.updateImages (/usr/img/lib/imgadm.js:1641:15)
    at IMGADM.listImages (/usr/img/lib/imgadm.js:1194:13)
    at doneLoading (/usr/img/lib/imgadm.js:971:25)
    at async.forEachSeries.iterate (/usr/img/node_modules/async/lib/async.js:116:25)
    at IMGADM._loadImages (/usr/img/lib/imgadm.js:964:25)
    at IMGADM._dbLoadImage (/usr/img/lib/imgadm.js:799:9)

Please fix with:

(I had to cut out some noise in the diff..)

--- imgadm.js   Sun Mar 24 16:56:09 2013
+++ /usr/img/lib/imgadm.js      Thu Mar 21 01:03:24 2013
@@ -1610,7 +1609,7 @@
             return;
         }
         var uuid = ii.manifest.uuid;
-        self.sourcesGet(uuid, function (sGetErr, imageInfo) {
+        self.sourcesGet(uuid, true, function (sGetErr, imageInfo) {
             if (sGetErr) {
                 next(sGetErr);
                 return;
@nahamu

This comment has been minimized.

Copy link

@nahamu nahamu commented Mar 24, 2013

I ran into this same problem. There is a workaround if you are in control of the manifests being served by the dsapi server which also clarifies the problem.

This error messsage was what caught my attention:
AssertionError: ensureActive (boolean) is required

I added a property to a manifest on my dsapi server:
"state":"active"
Having done that, imgadm was then happy to import the image.

Since that "state" property is part of the imgapi, but not part of the dsapi, I would describe the problem thus:
imgadm is checking the "state" property on all manifests when arguably it should only check that property when the manifest comes from an imgapi server, and should definitely not check that property when the manifest comes from a dsapi server.

I'm mentioning @trentm to get his attention since I suspect this issue will end up in his lap.
-Nahum

@trentm

This comment has been minimized.

Copy link
Member

@trentm trentm commented Mar 25, 2013

Sorry that I didn't catch this. Looking now.

trentm added a commit that referenced this issue Mar 25, 2013
@trentm trentm closed this Mar 25, 2013
@trentm

This comment has been minimized.

Copy link
Member

@trentm trentm commented Mar 26, 2013

Commit 0c7d7de is also relevant here. Without that commit, imgadm was refusing to import images from a DSAPI source. I broke this about two weeks ago with a64b572

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.