Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

UserData does not work without ConfigDrive in the Rackspace cloud #641

Open
gislifreyr opened this issue May 7, 2018 · 0 comments
Open

Comments

@gislifreyr
Copy link

For the UserData option to work, when creating a server in the RackSpace cloud, the ConfigDrive option has to be set to 'true'.

This does not work:

userData := `#cloud-config

    runcmd:
     - touch /root/testing`

server, err := servers.Create(client, servers.CreateOpts{
        Name: "test",
        ImageRef: image,
        FlavorRef: flavor,
        UserData: []byte(userData),
    }).Extract()

This works:

userData := `#cloud-config

    runcmd:
     - touch /root/testing`

server, err := servers.Create(client, servers.CreateOpts{
        Name: "test",
        ImageRef: image,
        FlavorRef: flavor,
        UserData: []byte(userData),
        ConfigDrive: true,
    }).Extract()

Possibly it should be checking if UserData is set and then setting ConfigDrive to true if it is.

@gislifreyr gislifreyr changed the title UserData does not work without ConfigDrive in the Rackspace clous UserData does not work without ConfigDrive in the Rackspace cloud May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant