yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #91556
[Bug 1486113] Re: write_files runs before users/groups, renders "owner" useless
This was resolved in the aforementioned pull request with the addition
of writing deferred files.
** Changed in: cloud-init
Status: Triaged => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1486113
Title:
write_files runs before users/groups, renders "owner" useless
Status in cloud-init:
Fix Released
Bug description:
When the following cloud-init script is run the expectation is that a
group called ssl-cert-client is created, and this group is applied to
the file that is written via the "owner" tag.
groups:
- ssl-cert-server
- ssl-cert-client
write_files:
- encoding: gzip
content: !!binary |
$(echo ${rsa_client_private_key} | gzip - | openssl base64 | sed -e "s/^/ /")
owner: root:ssl-cert-client
path: /etc/ssl/certs/${resourcegroup}-${machine}.${domain}-client.key
permissions: '0640'
What happens instead is that the writing of the file is attempted
before the creation of the group, and this file write fails because
the group ssl-cert-server does not yet exist.
The two tasks need to be swapped round before they are practically
useful.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1486113/+subscriptions
References