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

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

@gislifreyr

Description

@gislifreyr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions