Skip to content

Manual verification for config in x-shellscript#111

Merged
blackboxsw merged 2 commits into
cloud-init:masterfrom
lucasmoura:misdeclared-mimetypes
Jun 11, 2020
Merged

Manual verification for config in x-shellscript#111
blackboxsw merged 2 commits into
cloud-init:masterfrom
lucasmoura:misdeclared-mimetypes

Conversation

@lucasmoura
Copy link
Copy Markdown

Manual verification for #234

Comment thread bugs/gh-234.txt
Comment on lines +13 to +18
echo -e 'The userdata-mime file was generated by running the command:
tools/make-mime.py --attach userdata:x-shellscript > userdata-mime

where userdata is defined as the following file:
#cloud-config
final_message: The system is finally up, after seconds $UPTIME seconds'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a good example @lucasmoura I think it would be nice to add this little mime example to the lxd FAQ section about some use-cases https://cloudinit.readthedocs.io/en/latest/topics/faq.html#lxd

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I know we have a part of those docs here https://cloudinit.readthedocs.io/en/latest/topics/format.html?highlight=make-mime#helper-script-to-generate-mime-messages

maybe it is worth cross referencing those docs too in the faq

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think it is a good idea to add an example to the FAQ, but I don't know if this one is the best one, since it seems I little bit confusing at first, because the script is not shellscript per se, but the instance is passing this information with this type. Maybe the example should be one where the mime type is consistent with the content of the message. But I don't have much knowledge about MIME, so I don't know if my assumptions are correct

Comment thread bugs/gh-234.txt
lxc launch ubuntu-daily:$series $name_recreate -c user.user-data="$(cat userdata-mime)"

lxc exec $name_recreate -- cloud-init status --wait --long
lxc exec $name_recreate -- cat /var/lib/cloud/seed/nocloud-net/user-data
Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw Jun 11, 2020

Choose a reason for hiding this comment

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

A note that you can dump userdata with the following command: cloud-init query userdata which will work on all clouds

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Got ir, I will update the code

@blackboxsw blackboxsw merged commit fd6d25b into cloud-init:master Jun 11, 2020
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