libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Rommel (JIRA)" <>
Subject [jira] [Commented] (LIBCLOUD-356) Provide user-data for Openstack driver
Date Tue, 25 Feb 2014 18:06:23 GMT


Michael Rommel commented on LIBCLOUD-356:

Actually, I think this issue is mostly resolved in the current version of libcloud. Using
salt-cloud (which in turn uses libcloud) I can successfully pass a --user-data file which
gets appropriately send to openstack. What is missing though, is that the "config_drive":
true parameter also gets passed on to Openstack, therefore the creation of the config_drive

Here is an example of a compute-node with two running instances - one from nova and one via

root@flycatcher:/var/lib/nova/instances# find .
./48711a02-3520-497d-963c-5a08c7745761/disk.config     <-- this is the instance from the
nova boot command line
./69037e7a-e1a3-401d-b2a6-e7193b61a748/disk            <-- the salt-cloud/libcloud instance
is missing the config_drive

If I start an instance from the nova boot line, this gets submitted:

{"server": {"name": "trusty", "imageRef": "7820539e-495d-4c32-8639-2ddfbbea6ea9", "flavorRef":
"2", "user_data": "RnJvbSBub2JvZHkgU3VuIEZlYiAyMyAyMjoyODowNyAyMDE0CkNvbnRl. . . . . . . LT09PT09PT09PT09PT09PTE3OTAxMjExNDM2OTgyMzEzODA9PS0tCg==",
"max_count": 1, "min_count": 1, "networks": [{"uuid": "ee43ec1d-0cb3-48ff-9dd1-10e9c995f4f0"}],
"config_drive": true}}

This is in comparison the salt-cloud debug post to create the image:

{"server": {"name": "salty", "imageRef": "7820539e-495d-4c32-8639-2ddfbbea6ea9", "key_name":
"salt-ssh-key", "flavorRef": "2", "user_data": "RnJvbSBub2JvZHkgU3VuIEZlYiAyMyAyMjoyODowNyAyMDE0CkNvbnRl.
. . . . . . LT09PT09PT09PT09PT09PTE3OTAxMjExNDM2OTgyMzEzODA9PS0tCg==", "metadata": {}, "networks":
[{"uuid": "ee43ec1d-0cb3-48ff-9dd1-10e9c995f4f0"}], "personality": []}}

So I believe that the missing config_drive parameter is the culprit. I have checked the complete
libcloud source tree and could not find any place where the  parameter gets set or submitted
in the REST request.

> Provide user-data for Openstack driver
> --------------------------------------
>                 Key: LIBCLOUD-356
>                 URL:
>             Project: Libcloud
>          Issue Type: Improvement
>          Components: Compute
>    Affects Versions: 0.12.3
>         Environment: Libcloud 0.13.0 against Openstack
>            Reporter: Mattieu Puel
>              Labels: cloud-init, openstack, userdata
>             Fix For: 0.12.3
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
> libcloud openstack's driver supports parameter "user-data" (namely ex_userdata) for providing
user data to the instance. This is the equivalent to "nova boot --user-data" parameter.
> With Openstack nova command, this results in providing the content of the pointed file.
You may for instance provide a shell script, a configuration file for cloud-init...
> Once the VM startups, cloud-init retrieves the file from the metadata server and uses
it (executes it for shell scripts for instance).
> The libcloud behaviour is different: it simply passes the parameter content as is.

This message was sent by Atlassian JIRA

View raw message