New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Auth to Rackspace #1755

Closed
code-ape opened this Issue Dec 13, 2014 · 7 comments

Comments

Projects
None yet
7 participants
@code-ape

code-ape commented Dec 13, 2014

I've been trying with no success to use Packer to build an image with Rackspace. Currently here is my config:

{
  "variables": {
    "rackspace_username": "",
    "rackspace_password": ""
  },
  "builders": [
    {
      "type": "openstack",
      "username": "{{user `rackspace_username`}}",
      "password": "{{user `rackspace_password`}}",
      "provider": "rackspace-us",
      "region": "IAD",
      "ssh_username": "root",
      "image_name": "Test image {{timestamp}}",
      "source_image": "ea98e34c-7a25-4670-9e2a-7fa9815f6c9f",
      "flavor": "2"
    }
  ],
  "provisioners": [
    {
      "type": "shell",
      "inline": [
        "sleep 30",
        "sudo apt-get update",
        "sudo apt-get upgrade -y"
      ]
    }
  ]
}

But when I run:

packer build -var "rackspace_username=foo" -var "rackspace_password=bar" test.json 

I get:

openstack output will be in this color.

Build 'openstack' errored: Auth failed. Bad credentials.

==> Some builds didn't complete successfully and had errors:
--> openstack: Auth failed. Bad credentials.

==> Builds finished but no artifacts were created.

Any ideas?

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Feb 24, 2015

Contributor

Hi @code-ape,

I am sorry you are having problems with Packer. Are you able to provide any additional debugging information, preferably the output of the Packer run in debug mode? That would be super helpful 😄.

Please also double-check your credentials. Given this is the first report (and there aren't a bunch of 👍's), it seems that other users are not experiencing the same issue.

Finally, what version of Packer?

Contributor

sethvargo commented Feb 24, 2015

Hi @code-ape,

I am sorry you are having problems with Packer. Are you able to provide any additional debugging information, preferably the output of the Packer run in debug mode? That would be super helpful 😄.

Please also double-check your credentials. Given this is the first report (and there aren't a bunch of 👍's), it seems that other users are not experiencing the same issue.

Finally, what version of Packer?

@jruels

This comment has been minimized.

Show comment
Hide comment
@jruels

jruels Mar 3, 2015

I am seeing the same thing. I've tried multiple templates including the one from this issue as well as the example at https://www.packer.io/docs/builders/openstack.html.

Here's the output of debug log. Please let me know what else I can provide to resolve this.

2015/03/03 18:52:03 [INFO] Packer version: 0.7.5  9cd66feeacbd9cb318b72eb5ed59428c5b8c37ac+CHANGES
2015/03/03 18:52:03 Packer Target OS/Arch: linux amd64
2015/03/03 18:52:03 Built with Go Version: go1.3.3
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: amazon-chroot = /root/packer_rax/packer-builder-amazon-chroot
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: amazon-ebs = /root/packer_rax/packer-builder-amazon-ebs
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: amazon-instance = /root/packer_rax/packer-builder-amazon-instance
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: digitalocean = /root/packer_rax/packer-builder-digitalocean
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker = /root/packer_rax/packer-builder-docker
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: googlecompute = /root/packer_rax/packer-builder-googlecompute
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: null = /root/packer_rax/packer-builder-null
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: openstack = /root/packer_rax/packer-builder-openstack
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: parallels-iso = /root/packer_rax/packer-builder-parallels-iso
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: parallels-pvm = /root/packer_rax/packer-builder-parallels-pvm
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: qemu = /root/packer_rax/packer-builder-qemu
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: virtualbox-iso = /root/packer_rax/packer-builder-virtualbox-iso
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: virtualbox-ovf = /root/packer_rax/packer-builder-virtualbox-ovf
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vmware-iso = /root/packer_rax/packer-builder-vmware-iso
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vmware-vmx = /root/packer_rax/packer-builder-vmware-vmx
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: atlas = /root/packer_rax/packer-post-processor-atlas
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: compress = /root/packer_rax/packer-post-processor-compress
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-import = /root/packer_rax/packer-post-processor-docker-import
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-push = /root/packer_rax/packer-post-processor-docker-push
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-save = /root/packer_rax/packer-post-processor-docker-save
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-tag = /root/packer_rax/packer-post-processor-docker-tag
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vagrant = /root/packer_rax/packer-post-processor-vagrant
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vagrant-cloud = /root/packer_rax/packer-post-processor-vagrant-cloud
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vsphere = /root/packer_rax/packer-post-processor-vsphere
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: ansible-local = /root/packer_rax/packer-provisioner-ansible-local
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: chef-client = /root/packer_rax/packer-provisioner-chef-client
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: chef-solo = /root/packer_rax/packer-provisioner-chef-solo
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: file = /root/packer_rax/packer-provisioner-file
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: puppet-masterless = /root/packer_rax/packer-provisioner-puppet-masterless
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: puppet-server = /root/packer_rax/packer-provisioner-puppet-server
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: salt-masterless = /root/packer_rax/packer-provisioner-salt-masterless
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: shell = /root/packer_rax/packer-provisioner-shell
2015/03/03 18:52:03 Detected home directory from env var: /root
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: amazon-chroot = /root/packer_rax/packer-builder-amazon-chroot
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: amazon-ebs = /root/packer_rax/packer-builder-amazon-ebs
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: amazon-instance = /root/packer_rax/packer-builder-amazon-instance
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: digitalocean = /root/packer_rax/packer-builder-digitalocean
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker = /root/packer_rax/packer-builder-docker
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: googlecompute = /root/packer_rax/packer-builder-googlecompute
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: null = /root/packer_rax/packer-builder-null
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: openstack = /root/packer_rax/packer-builder-openstack
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: parallels-iso = /root/packer_rax/packer-builder-parallels-iso
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: parallels-pvm = /root/packer_rax/packer-builder-parallels-pvm
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: qemu = /root/packer_rax/packer-builder-qemu
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: virtualbox-iso = /root/packer_rax/packer-builder-virtualbox-iso
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: virtualbox-ovf = /root/packer_rax/packer-builder-virtualbox-ovf
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vmware-iso = /root/packer_rax/packer-builder-vmware-iso
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vmware-vmx = /root/packer_rax/packer-builder-vmware-vmx
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: atlas = /root/packer_rax/packer-post-processor-atlas
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: compress = /root/packer_rax/packer-post-processor-compress
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-import = /root/packer_rax/packer-post-processor-docker-import
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-push = /root/packer_rax/packer-post-processor-docker-push
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-save = /root/packer_rax/packer-post-processor-docker-save
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-tag = /root/packer_rax/packer-post-processor-docker-tag
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vagrant = /root/packer_rax/packer-post-processor-vagrant
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vagrant-cloud = /root/packer_rax/packer-post-processor-vagrant-cloud
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vsphere = /root/packer_rax/packer-post-processor-vsphere
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: ansible-local = /root/packer_rax/packer-provisioner-ansible-local
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: chef-client = /root/packer_rax/packer-provisioner-chef-client
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: chef-solo = /root/packer_rax/packer-provisioner-chef-solo
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: file = /root/packer_rax/packer-provisioner-file
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: puppet-masterless = /root/packer_rax/packer-provisioner-puppet-masterless
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: puppet-server = /root/packer_rax/packer-provisioner-puppet-server
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: salt-masterless = /root/packer_rax/packer-provisioner-salt-masterless
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: shell = /root/packer_rax/packer-provisioner-shell
2015/03/03 18:52:03 Detected home directory from env var: /root
2015/03/03 18:52:03 Attempting to open config file: /root/.packerconfig
2015/03/03 18:52:03 File doesn't exist, but doesn't need to. Ignoring.
2015/03/03 18:52:03 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[digitalocean:/root/packer_rax/packer-builder-digitalocean vmware-vmx:/root/packer_rax/packer-builder-vmware-vmx openstack:/root/packer_rax/packer-builder-openstack parallels-iso:/root/packer_rax/packer-builder-parallels-iso parallels-pvm:/root/packer_rax/packer-builder-parallels-pvm qemu:/root/packer_rax/packer-builder-qemu amazon-chroot:/root/packer_rax/packer-builder-amazon-chroot amazon-instance:/root/packer_rax/packer-builder-amazon-instance docker:/root/packer_rax/packer-builder-docker googlecompute:/root/packer_rax/packer-builder-googlecompute virtualbox-iso:/root/packer_rax/packer-builder-virtualbox-iso virtualbox-ovf:/root/packer_rax/packer-builder-virtualbox-ovf vmware-iso:/root/packer_rax/packer-builder-vmware-iso amazon-ebs:/root/packer_rax/packer-builder-amazon-ebs null:/root/packer_rax/packer-builder-null] PostProcessors:map[compress:/root/packer_rax/packer-post-processor-compress docker-import:/root/packer_rax/packer-post-processor-docker-import docker-save:/root/packer_rax/packer-post-processor-docker-save atlas:/root/packer_rax/packer-post-processor-atlas docker-push:/root/packer_rax/packer-post-processor-docker-push docker-tag:/root/packer_rax/packer-post-processor-docker-tag vagrant:/root/packer_rax/packer-post-processor-vagrant vagrant-cloud:/root/packer_rax/packer-post-processor-vagrant-cloud vsphere:/root/packer_rax/packer-post-processor-vsphere] Provisioners:map[salt-masterless:/root/packer_rax/packer-provisioner-salt-masterless shell:/root/packer_rax/packer-provisioner-shell ansible-local:/root/packer_rax/packer-provisioner-ansible-local chef-client:/root/packer_rax/packer-provisioner-chef-client chef-solo:/root/packer_rax/packer-provisioner-chef-solo file:/root/packer_rax/packer-provisioner-file puppet-masterless:/root/packer_rax/packer-provisioner-puppet-masterless puppet-server:/root/packer_rax/packer-provisioner-puppet-server]}
2015/03/03 18:52:03 Setting cache directory: /root/packer_rax/packer_cache
2015/03/03 18:52:03 Reading template: test.json
2015/03/03 18:52:03 Detected home directory from env var: /root
2015/03/03 18:52:03 Creating build: openstack
2015/03/03 18:52:03 Loading builder: openstack
2015/03/03 18:52:03 Creating plugin client for path: /root/packer_rax/packer-builder-openstack
2015/03/03 18:52:03 Starting plugin: /root/packer_rax/packer-builder-openstack []string{"/root/packer_rax/packer-builder-openstack"}
2015/03/03 18:52:03 Waiting for RPC address for: /root/packer_rax/packer-builder-openstack
2015/03/03 18:52:03 packer-builder-openstack: 2015/03/03 18:52:03 Plugin minimum port: 10000
2015/03/03 18:52:03 packer-builder-openstack: 2015/03/03 18:52:03 Plugin maximum port: 25000
2015/03/03 18:52:03 packer-builder-openstack: 2015/03/03 18:52:03 Plugin address: unix /tmp/packer-plugin801332654
2015/03/03 18:52:03 packer-builder-openstack: 2015/03/03 18:52:03 Waiting for connection...
2015/03/03 18:52:03 packer-builder-openstack: 2015/03/03 18:52:03 Serving a plugin connection...
2015/03/03 18:52:03 Loading provisioner: shell
2015/03/03 18:52:03 Creating plugin client for path: /root/packer_rax/packer-provisioner-shell
2015/03/03 18:52:03 Starting plugin: /root/packer_rax/packer-provisioner-shell []string{"/root/packer_rax/packer-provisioner-shell"}
2015/03/03 18:52:03 Waiting for RPC address for: /root/packer_rax/packer-provisioner-shell
2015/03/03 18:52:03 packer-provisioner-shell: 2015/03/03 18:52:03 Plugin minimum port: 10000
2015/03/03 18:52:03 packer-provisioner-shell: 2015/03/03 18:52:03 Plugin maximum port: 25000
2015/03/03 18:52:03 packer-provisioner-shell: 2015/03/03 18:52:03 Plugin address: unix /tmp/packer-plugin433378456
2015/03/03 18:52:03 packer-provisioner-shell: 2015/03/03 18:52:03 Waiting for connection...
2015/03/03 18:52:03 packer-provisioner-shell: 2015/03/03 18:52:03 Serving a plugin connection...
2015/03/03 18:52:03 ui: openstack output will be in this color.
2015/03/03 18:52:03 ui:
2015/03/03 18:52:03 Build debug mode: false
2015/03/03 18:52:03 Force build: false
2015/03/03 18:52:03 Preparing build: openstack
2015/03/03 18:52:03 packer-builder-openstack: 2015/03/03 18:52:03 Config: {PackerConfig:{PackerBuildName:openstack PackerBuilderType:openstack PackerDebug:false PackerForce:false PackerUserVars:map[rackspace_username:aslaen rackspace_password:<Filtered>]} AccessConfig:{Username:aslaen Password:<Filtered> ApiKey: Project: Provider:rackspace-us RawRegion:IAD ProxyUrl: TenantId: Insecure:false} ImageConfig:{ImageName:Test image 1425408723} RunConfig:{SourceImage:ea98e34c-7a25-4670-9e2a-7fa9815f6c9f Flavor:2 RawSSHTimeout:5m SSHUsername:root SSHPort:22 OpenstackProvider: UseFloatingIp:false FloatingIpPool: FloatingIp: SecurityGroups:[] Networks:[] sshTimeout:300000000000} tpl:0xc2080be120}
2015/03/03 18:52:03 Waiting on builds to complete...
2015/03/03 18:52:03 Starting build run: openstack
2015/03/03 18:52:03 Running builder: openstack
2015/03/03 18:52:04 ui error: Build 'openstack' errored: Auth failed. Bad credentials.
2015/03/03 18:52:04 Builds completed. Waiting on interrupt barrier...
2015/03/03 18:52:04 machine readable: error-count []string{"1"}
2015/03/03 18:52:04 ui error:
==> Some builds didn't complete successfully and had errors:
2015/03/03 18:52:04 machine readable: openstack,error []string{"Auth failed. Bad credentials."}
2015/03/03 18:52:04 ui error: --> openstack: Auth failed. Bad credentials.
2015/03/03 18:52:04 ui:
==> Builds finished but no artifacts were created.
2015/03/03 18:52:04 waiting for all plugin processes to complete...
2015/03/03 18:52:04 /root/packer_rax/packer-provisioner-shell: plugin process exited
2015/03/03 18:52:04 /root/packer_rax/packer-builder-openstack: plugin process exited

jruels commented Mar 3, 2015

I am seeing the same thing. I've tried multiple templates including the one from this issue as well as the example at https://www.packer.io/docs/builders/openstack.html.

Here's the output of debug log. Please let me know what else I can provide to resolve this.

2015/03/03 18:52:03 [INFO] Packer version: 0.7.5  9cd66feeacbd9cb318b72eb5ed59428c5b8c37ac+CHANGES
2015/03/03 18:52:03 Packer Target OS/Arch: linux amd64
2015/03/03 18:52:03 Built with Go Version: go1.3.3
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: amazon-chroot = /root/packer_rax/packer-builder-amazon-chroot
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: amazon-ebs = /root/packer_rax/packer-builder-amazon-ebs
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: amazon-instance = /root/packer_rax/packer-builder-amazon-instance
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: digitalocean = /root/packer_rax/packer-builder-digitalocean
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker = /root/packer_rax/packer-builder-docker
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: googlecompute = /root/packer_rax/packer-builder-googlecompute
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: null = /root/packer_rax/packer-builder-null
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: openstack = /root/packer_rax/packer-builder-openstack
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: parallels-iso = /root/packer_rax/packer-builder-parallels-iso
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: parallels-pvm = /root/packer_rax/packer-builder-parallels-pvm
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: qemu = /root/packer_rax/packer-builder-qemu
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: virtualbox-iso = /root/packer_rax/packer-builder-virtualbox-iso
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: virtualbox-ovf = /root/packer_rax/packer-builder-virtualbox-ovf
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vmware-iso = /root/packer_rax/packer-builder-vmware-iso
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vmware-vmx = /root/packer_rax/packer-builder-vmware-vmx
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: atlas = /root/packer_rax/packer-post-processor-atlas
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: compress = /root/packer_rax/packer-post-processor-compress
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-import = /root/packer_rax/packer-post-processor-docker-import
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-push = /root/packer_rax/packer-post-processor-docker-push
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-save = /root/packer_rax/packer-post-processor-docker-save
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-tag = /root/packer_rax/packer-post-processor-docker-tag
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vagrant = /root/packer_rax/packer-post-processor-vagrant
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vagrant-cloud = /root/packer_rax/packer-post-processor-vagrant-cloud
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vsphere = /root/packer_rax/packer-post-processor-vsphere
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: ansible-local = /root/packer_rax/packer-provisioner-ansible-local
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: chef-client = /root/packer_rax/packer-provisioner-chef-client
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: chef-solo = /root/packer_rax/packer-provisioner-chef-solo
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: file = /root/packer_rax/packer-provisioner-file
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: puppet-masterless = /root/packer_rax/packer-provisioner-puppet-masterless
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: puppet-server = /root/packer_rax/packer-provisioner-puppet-server
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: salt-masterless = /root/packer_rax/packer-provisioner-salt-masterless
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: shell = /root/packer_rax/packer-provisioner-shell
2015/03/03 18:52:03 Detected home directory from env var: /root
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: amazon-chroot = /root/packer_rax/packer-builder-amazon-chroot
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: amazon-ebs = /root/packer_rax/packer-builder-amazon-ebs
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: amazon-instance = /root/packer_rax/packer-builder-amazon-instance
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: digitalocean = /root/packer_rax/packer-builder-digitalocean
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker = /root/packer_rax/packer-builder-docker
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: googlecompute = /root/packer_rax/packer-builder-googlecompute
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: null = /root/packer_rax/packer-builder-null
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: openstack = /root/packer_rax/packer-builder-openstack
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: parallels-iso = /root/packer_rax/packer-builder-parallels-iso
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: parallels-pvm = /root/packer_rax/packer-builder-parallels-pvm
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: qemu = /root/packer_rax/packer-builder-qemu
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: virtualbox-iso = /root/packer_rax/packer-builder-virtualbox-iso
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: virtualbox-ovf = /root/packer_rax/packer-builder-virtualbox-ovf
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vmware-iso = /root/packer_rax/packer-builder-vmware-iso
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vmware-vmx = /root/packer_rax/packer-builder-vmware-vmx
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: atlas = /root/packer_rax/packer-post-processor-atlas
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: compress = /root/packer_rax/packer-post-processor-compress
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-import = /root/packer_rax/packer-post-processor-docker-import
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-push = /root/packer_rax/packer-post-processor-docker-push
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-save = /root/packer_rax/packer-post-processor-docker-save
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: docker-tag = /root/packer_rax/packer-post-processor-docker-tag
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vagrant = /root/packer_rax/packer-post-processor-vagrant
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vagrant-cloud = /root/packer_rax/packer-post-processor-vagrant-cloud
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: vsphere = /root/packer_rax/packer-post-processor-vsphere
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: ansible-local = /root/packer_rax/packer-provisioner-ansible-local
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: chef-client = /root/packer_rax/packer-provisioner-chef-client
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: chef-solo = /root/packer_rax/packer-provisioner-chef-solo
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: file = /root/packer_rax/packer-provisioner-file
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: puppet-masterless = /root/packer_rax/packer-provisioner-puppet-masterless
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: puppet-server = /root/packer_rax/packer-provisioner-puppet-server
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: salt-masterless = /root/packer_rax/packer-provisioner-salt-masterless
2015/03/03 18:52:03 [DEBUG] Discoverd plugin: shell = /root/packer_rax/packer-provisioner-shell
2015/03/03 18:52:03 Detected home directory from env var: /root
2015/03/03 18:52:03 Attempting to open config file: /root/.packerconfig
2015/03/03 18:52:03 File doesn't exist, but doesn't need to. Ignoring.
2015/03/03 18:52:03 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[digitalocean:/root/packer_rax/packer-builder-digitalocean vmware-vmx:/root/packer_rax/packer-builder-vmware-vmx openstack:/root/packer_rax/packer-builder-openstack parallels-iso:/root/packer_rax/packer-builder-parallels-iso parallels-pvm:/root/packer_rax/packer-builder-parallels-pvm qemu:/root/packer_rax/packer-builder-qemu amazon-chroot:/root/packer_rax/packer-builder-amazon-chroot amazon-instance:/root/packer_rax/packer-builder-amazon-instance docker:/root/packer_rax/packer-builder-docker googlecompute:/root/packer_rax/packer-builder-googlecompute virtualbox-iso:/root/packer_rax/packer-builder-virtualbox-iso virtualbox-ovf:/root/packer_rax/packer-builder-virtualbox-ovf vmware-iso:/root/packer_rax/packer-builder-vmware-iso amazon-ebs:/root/packer_rax/packer-builder-amazon-ebs null:/root/packer_rax/packer-builder-null] PostProcessors:map[compress:/root/packer_rax/packer-post-processor-compress docker-import:/root/packer_rax/packer-post-processor-docker-import docker-save:/root/packer_rax/packer-post-processor-docker-save atlas:/root/packer_rax/packer-post-processor-atlas docker-push:/root/packer_rax/packer-post-processor-docker-push docker-tag:/root/packer_rax/packer-post-processor-docker-tag vagrant:/root/packer_rax/packer-post-processor-vagrant vagrant-cloud:/root/packer_rax/packer-post-processor-vagrant-cloud vsphere:/root/packer_rax/packer-post-processor-vsphere] Provisioners:map[salt-masterless:/root/packer_rax/packer-provisioner-salt-masterless shell:/root/packer_rax/packer-provisioner-shell ansible-local:/root/packer_rax/packer-provisioner-ansible-local chef-client:/root/packer_rax/packer-provisioner-chef-client chef-solo:/root/packer_rax/packer-provisioner-chef-solo file:/root/packer_rax/packer-provisioner-file puppet-masterless:/root/packer_rax/packer-provisioner-puppet-masterless puppet-server:/root/packer_rax/packer-provisioner-puppet-server]}
2015/03/03 18:52:03 Setting cache directory: /root/packer_rax/packer_cache
2015/03/03 18:52:03 Reading template: test.json
2015/03/03 18:52:03 Detected home directory from env var: /root
2015/03/03 18:52:03 Creating build: openstack
2015/03/03 18:52:03 Loading builder: openstack
2015/03/03 18:52:03 Creating plugin client for path: /root/packer_rax/packer-builder-openstack
2015/03/03 18:52:03 Starting plugin: /root/packer_rax/packer-builder-openstack []string{"/root/packer_rax/packer-builder-openstack"}
2015/03/03 18:52:03 Waiting for RPC address for: /root/packer_rax/packer-builder-openstack
2015/03/03 18:52:03 packer-builder-openstack: 2015/03/03 18:52:03 Plugin minimum port: 10000
2015/03/03 18:52:03 packer-builder-openstack: 2015/03/03 18:52:03 Plugin maximum port: 25000
2015/03/03 18:52:03 packer-builder-openstack: 2015/03/03 18:52:03 Plugin address: unix /tmp/packer-plugin801332654
2015/03/03 18:52:03 packer-builder-openstack: 2015/03/03 18:52:03 Waiting for connection...
2015/03/03 18:52:03 packer-builder-openstack: 2015/03/03 18:52:03 Serving a plugin connection...
2015/03/03 18:52:03 Loading provisioner: shell
2015/03/03 18:52:03 Creating plugin client for path: /root/packer_rax/packer-provisioner-shell
2015/03/03 18:52:03 Starting plugin: /root/packer_rax/packer-provisioner-shell []string{"/root/packer_rax/packer-provisioner-shell"}
2015/03/03 18:52:03 Waiting for RPC address for: /root/packer_rax/packer-provisioner-shell
2015/03/03 18:52:03 packer-provisioner-shell: 2015/03/03 18:52:03 Plugin minimum port: 10000
2015/03/03 18:52:03 packer-provisioner-shell: 2015/03/03 18:52:03 Plugin maximum port: 25000
2015/03/03 18:52:03 packer-provisioner-shell: 2015/03/03 18:52:03 Plugin address: unix /tmp/packer-plugin433378456
2015/03/03 18:52:03 packer-provisioner-shell: 2015/03/03 18:52:03 Waiting for connection...
2015/03/03 18:52:03 packer-provisioner-shell: 2015/03/03 18:52:03 Serving a plugin connection...
2015/03/03 18:52:03 ui: openstack output will be in this color.
2015/03/03 18:52:03 ui:
2015/03/03 18:52:03 Build debug mode: false
2015/03/03 18:52:03 Force build: false
2015/03/03 18:52:03 Preparing build: openstack
2015/03/03 18:52:03 packer-builder-openstack: 2015/03/03 18:52:03 Config: {PackerConfig:{PackerBuildName:openstack PackerBuilderType:openstack PackerDebug:false PackerForce:false PackerUserVars:map[rackspace_username:aslaen rackspace_password:<Filtered>]} AccessConfig:{Username:aslaen Password:<Filtered> ApiKey: Project: Provider:rackspace-us RawRegion:IAD ProxyUrl: TenantId: Insecure:false} ImageConfig:{ImageName:Test image 1425408723} RunConfig:{SourceImage:ea98e34c-7a25-4670-9e2a-7fa9815f6c9f Flavor:2 RawSSHTimeout:5m SSHUsername:root SSHPort:22 OpenstackProvider: UseFloatingIp:false FloatingIpPool: FloatingIp: SecurityGroups:[] Networks:[] sshTimeout:300000000000} tpl:0xc2080be120}
2015/03/03 18:52:03 Waiting on builds to complete...
2015/03/03 18:52:03 Starting build run: openstack
2015/03/03 18:52:03 Running builder: openstack
2015/03/03 18:52:04 ui error: Build 'openstack' errored: Auth failed. Bad credentials.
2015/03/03 18:52:04 Builds completed. Waiting on interrupt barrier...
2015/03/03 18:52:04 machine readable: error-count []string{"1"}
2015/03/03 18:52:04 ui error:
==> Some builds didn't complete successfully and had errors:
2015/03/03 18:52:04 machine readable: openstack,error []string{"Auth failed. Bad credentials."}
2015/03/03 18:52:04 ui error: --> openstack: Auth failed. Bad credentials.
2015/03/03 18:52:04 ui:
==> Builds finished but no artifacts were created.
2015/03/03 18:52:04 waiting for all plugin processes to complete...
2015/03/03 18:52:04 /root/packer_rax/packer-provisioner-shell: plugin process exited
2015/03/03 18:52:04 /root/packer_rax/packer-builder-openstack: plugin process exited
@jruels

This comment has been minimized.

Show comment
Hide comment
@jruels

jruels Mar 3, 2015

Ok, I ended up fixing this! @code-ape. You need to add the following to your template "openstack_provider": "rackspace"

So the below updated template should work.

{
  "variables": {
    "rackspace_username": "",
    "rackspace_password": ""
  },
  "builders": [
    {
      "type": "openstack",
      "username": "{{user `rackspace_username`}}",
      "password": "{{user `rackspace_password`}}",
      "provider": "rackspace-us",
      "openstack_provider": "rackspace", 
      "region": "IAD",
      "ssh_username": "root",
      "image_name": "Test image {{timestamp}}",
      "source_image": "ea98e34c-7a25-4670-9e2a-7fa9815f6c9f",
      "flavor": "2"
    }
  ],
  "provisioners": [
    {
      "type": "shell",
      "inline": [
        "sleep 30",
        "sudo apt-get update",
        "sudo apt-get upgrade -y"
      ]
    }
  ]
}

jruels commented Mar 3, 2015

Ok, I ended up fixing this! @code-ape. You need to add the following to your template "openstack_provider": "rackspace"

So the below updated template should work.

{
  "variables": {
    "rackspace_username": "",
    "rackspace_password": ""
  },
  "builders": [
    {
      "type": "openstack",
      "username": "{{user `rackspace_username`}}",
      "password": "{{user `rackspace_password`}}",
      "provider": "rackspace-us",
      "openstack_provider": "rackspace", 
      "region": "IAD",
      "ssh_username": "root",
      "image_name": "Test image {{timestamp}}",
      "source_image": "ea98e34c-7a25-4670-9e2a-7fa9815f6c9f",
      "flavor": "2"
    }
  ],
  "provisioners": [
    {
      "type": "shell",
      "inline": [
        "sleep 30",
        "sudo apt-get update",
        "sudo apt-get upgrade -y"
      ]
    }
  ]
}
@jamiehannaford

This comment has been minimized.

Show comment
Hide comment
@jamiehannaford

jamiehannaford Mar 17, 2015

@code-ape Do you have any credentials saved as env vars? I ran into this problem because Packer kept pulling in env vars even though I was explicitly setting them in my JSON file. Try:

env -i /path/to/packer build example.json

@sethvargo Is this expected behaviour? Should env vars be given precedence over file-defined vars?

jamiehannaford commented Mar 17, 2015

@code-ape Do you have any credentials saved as env vars? I ran into this problem because Packer kept pulling in env vars even though I was explicitly setting them in my JSON file. Try:

env -i /path/to/packer build example.json

@sethvargo Is this expected behaviour? Should env vars be given precedence over file-defined vars?

@bossjones

This comment has been minimized.

Show comment
Hide comment
@bossjones

bossjones Apr 15, 2015

The issue I discovered w/ this is that I was setting too many environment variables and that was causing packer to go crazy.

I simplified things into a small environment variable file to source local.sh:

export SDK_USERNAME="BLAH"
export SDK_PASSWORD='BLAH'
export SDK_API_KEY='BLAH'
export SDK_PROVIDER="rackspace-us"
export SDK_REGION="DFW"

ran source ./local.sh

Then my template looks something like this (rackspace public cloud):

NOTE: Notice I did not set any password/etc in the actual template. Packer reads in directly from your environment and populates everything accordingly.

{
  "variables": {
    "BE_SSH_PASSWORD": "",
    "REGION": "us-east-1",
    "INSTANCE_TYPE": "m3.large",
    "SSH_USERNAME": "centos",
    "SSH_TIMEOUT": "5m"
  },
  "builders": [
    {
      "type": "openstack",
      "name": "rackspace-public",
      "username": "",
      "password": "",
      "api_key": "",
      "provider": "rackspace-us",
      "openstack_provider": "rackspace",
      "region": "DFW",
      "ssh_username": "root",
      "insecure": "false",
      "image_name": "centos66-{{timestamp}}",
      "source_image": "blah",
      "flavor": "performance1-1"
    },

Hope this helps someone.

bossjones commented Apr 15, 2015

The issue I discovered w/ this is that I was setting too many environment variables and that was causing packer to go crazy.

I simplified things into a small environment variable file to source local.sh:

export SDK_USERNAME="BLAH"
export SDK_PASSWORD='BLAH'
export SDK_API_KEY='BLAH'
export SDK_PROVIDER="rackspace-us"
export SDK_REGION="DFW"

ran source ./local.sh

Then my template looks something like this (rackspace public cloud):

NOTE: Notice I did not set any password/etc in the actual template. Packer reads in directly from your environment and populates everything accordingly.

{
  "variables": {
    "BE_SSH_PASSWORD": "",
    "REGION": "us-east-1",
    "INSTANCE_TYPE": "m3.large",
    "SSH_USERNAME": "centos",
    "SSH_TIMEOUT": "5m"
  },
  "builders": [
    {
      "type": "openstack",
      "name": "rackspace-public",
      "username": "",
      "password": "",
      "api_key": "",
      "provider": "rackspace-us",
      "openstack_provider": "rackspace",
      "region": "DFW",
      "ssh_username": "root",
      "insecure": "false",
      "image_name": "centos66-{{timestamp}}",
      "source_image": "blah",
      "flavor": "performance1-1"
    },

Hope this helps someone.

@itsmemattchung

This comment has been minimized.

Show comment
Hide comment
@itsmemattchung

itsmemattchung Apr 29, 2015

I had this same issue last night. "api_key" is required for Rackspace cloud. You can omit "password" and it'll build successfully.

https://www.packer.io/docs/builders/openstack.html
api_key (string) - The API key used to access OpenStack. Some OpenStack installations require this. If not specified, Packer will use the environment variables SDK_API_KEY, if set.

itsmemattchung commented Apr 29, 2015

I had this same issue last night. "api_key" is required for Rackspace cloud. You can omit "password" and it'll build successfully.

https://www.packer.io/docs/builders/openstack.html
api_key (string) - The API key used to access OpenStack. Some OpenStack installations require this. If not specified, Packer will use the environment variables SDK_API_KEY, if set.

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh Jun 13, 2015

Member

Ah, this should be fixed with the latest OpenStack merges.

Member

mitchellh commented Jun 13, 2015

Ah, this should be fixed with the latest OpenStack merges.

@mitchellh mitchellh closed this Jun 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment