Skip to content

Fix smartos_imgadm doesn't handle orphan images#55137

Merged
dwoz merged 3 commits into
saltstack:masterfrom
sjorge:55136
Dec 9, 2019
Merged

Fix smartos_imgadm doesn't handle orphan images#55137
dwoz merged 3 commits into
saltstack:masterfrom
sjorge:55136

Conversation

@sjorge

@sjorge sjorge commented Oct 26, 2019

Copy link
Copy Markdown
Contributor

What does this PR do?

Update _parse_image_meta so that it handles orphan images.
Additionally we also pull in the changes from #51563 to master as those are also needed.

What issues does this PR fix or reference?

#55136

Previous Behavior

_parse_image_meta would not handle orphan image data e.g.

{
  "manifest": {
    "uuid": "07f360fd-12d5-e624-a279-eb8a15b630f6"
  },
  "zpool": "zones",
  "cloneNames": [],
  "clones": 0
}

New Behavior

_parse_image_meta will now check if the 'name' field is present.

Tests written?

Yes, there were no tests for smartos_imgadm yet. Tests for _parse_image_meta were added that feed is various kinds of image data. Currently those are 'orphan', 'native', 'lx', and 'zvol'.

Those cover the currently available image types available in SmartOS

Commits signed with GPG?

No

@sjorge sjorge requested a review from a team as a code owner October 26, 2019 15:47
@ghost ghost requested a review from DmitryKuzmenko October 26, 2019 15:47
@sjorge

sjorge commented Oct 31, 2019

Copy link
Copy Markdown
Contributor Author

I'm not sure how to fix the ci/py3 failures?

@sjorge

sjorge commented Nov 18, 2019

Copy link
Copy Markdown
Contributor Author

@Ch3LL aside from a rebase, anything blocking this? CI seems to always fail for a bunch of distros but it are just unit tests which is weird as they work fine locally and on some targets?

@sjorge

sjorge commented Dec 3, 2019

Copy link
Copy Markdown
Contributor Author

@Ch3LL bump

@dwoz dwoz merged commit a643496 into saltstack:master Dec 9, 2019
@sjorge sjorge deleted the 55136 branch December 10, 2019 06:19
@sjorge

sjorge commented Dec 10, 2019

Copy link
Copy Markdown
Contributor Author

Thanks for merging!

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

Successfully merging this pull request may close these issues.

2 participants