The code that does this check is here:

https://github.com/joyent/smartos-live/blob/master/src/img/lib/imgadm.js#L139

Specifically, the following code block is generating the error.

    if (platVer < lowestSpecVer) {
        return new errors.MinPlatformError(platVer,
            platTimestamp, minPlatSpec);
    }

In this case, platVer is the SDC platform version. All SmartOS builds for quite 
some time have used the string "7.0", which is also displayed in the output you 
show below. The lowestSpecVer comes from the image manifest and in this case is 
a string, "undefined".

Therefore then, using the node REPL.

    $ node
    > var platVer = "7.0";
    undefined
    > var lowestSpecVer = "undefined";
    undefined
    > platVer < lowestSpecVer
    true

And this is why it's producing an error. Both are strings, and since "7" 
alphanumerically comes before "u",  "7"<"u".

I've filed [IMGAPI-580](https://smartos.org/bugview/IMGAPI-580) to track this 
issue.

Note, that regardless of imgadm's behavior here, Fifo can avoid this by setting 
the min_platform key to some string value that will satisfy the `platVer < 
lowestSpecVer` comparison.

-- 
Brian Bennett
Systems Engineer, Cloud Operations
Joyent, Inc. | www.joyent.com

> On Aug 8, 2016, at 12:07 PM, Jon Dison <[email protected]> wrote:
> 
> I'd already asked this over on the project-fifo google group, but wasn't 
> getting any traction over there.
> 
> Has anyone run into this issue?
> 
> I've tried different versions of the platform, currently using the oldest 
> that was still compatible per a recommendation on the google groups.
> 
> [root@smartos ~]# imgadm import 290edd53-da31-48ec-951d-163a75946448
> Importing 290edd53-da31-48ec-951d-163a75946448 ([email protected]) from 
> "https://datasets.project-fifo.net";
> Gather image 290edd53-da31-48ec-951d-163a75946448 ancestry
> Aborting (current platform version, 7.0/20151104T185720Z, does not satisfy 
> requirements.min_platform={"undefined":"20150108T111855Z"})
> imgadm import: error (MinPlatform): current platform version, 
> 7.0/20151104T185720Z, does not satisfy 
> requirements.min_platform={"undefined":"20150108T111855Z"}
> 
> smartos-discuss | Archives  | Modify Your Subscription         

Attachment: smime.p7s
Description: S/MIME cryptographic signature




-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to