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

sysconfig/cloudinit.go: measure (but don't use) gadget cloud-init datasource #10572

Merged

Conversation

anonymouse64
Copy link
Member

In a future commit, we will use the result of measuring the datasource settings
for the cloud-init config from the gadget, but for now just introduce the
machinery to read it.

@anonymouse64 anonymouse64 added UC20 Run nested The PR also runs tests inluded in nested suite labels Jul 28, 2021
@anonymouse64 anonymouse64 force-pushed the feature/uc20-cloud-init-maas-support-2 branch from 2b85e92 to 76823fd Compare July 28, 2021 21:56
@anonymouse64
Copy link
Member Author

I opened #10573 which is the full WIP branch that is based on top of this to demonstrate how this code is used, specifically see https://github.com/snapcore/snapd/pull/10573/files#diff-3450862368a77e8ae5d3817feb24a674eadc445a262c1f086d5a3e1a6174ad21L185-R446 for how this is used for decision making

…asource

In a future commit, we will use the result of measuring the datasource settings
for the cloud-init config from the gadget, but for now just introduce the
machinery to read it.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
@anonymouse64 anonymouse64 force-pushed the feature/uc20-cloud-init-maas-support-2 branch from 76823fd to 020a1f9 Compare August 3, 2021 15:56
@anonymouse64 anonymouse64 added the Needs Samuele review Needs a review from Samuele before it can land label Aug 4, 2021
Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

sysconfig/cloudinit_test.go Show resolved Hide resolved
sysconfig/cloudinit.go Outdated Show resolved Hide resolved
…_list

We previously would just create a list with the duplicated names in it, which
didn't break anything but may be confusing for some other bits of code later
on. Instead trim out duplicates using a map instead of appending directly into
the resultant list.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
Copy link
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mvo5 mvo5 merged commit bf1869b into snapcore:master Aug 12, 2021
@anonymouse64 anonymouse64 deleted the feature/uc20-cloud-init-maas-support-2 branch August 12, 2021 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Samuele review Needs a review from Samuele before it can land Run nested The PR also runs tests inluded in nested suite
Projects
None yet
3 participants