Ask Your Question
0

Error Authentication running Packer with Openstack template

asked 2016-01-27 05:21:44 -0500

YamanduTellechea gravatar image

I have created a simple openstack template to packer:

{"builders":[
{
  "type": "openstack",
  "username": "root",
  "password": "temporal",
  "region": "xxxxx",
  "ssh_username": "root",
  "image_name": "xxx_Packer",
  "source_image": "xxxxxxxxxxxxxxxxxx",
  "flavor": "A1"

}
]}

and I have declared necessary enviroment variables to authentication:

OS_AUTH_URL=http://keystone.xxxxxxx:5000/v2.0
OS_TENANT_ID=xxxxxxx
OS_TENANT_NAME="xxxxxxx"
OS_USERNAME="xxxxxxx"
OS_PASSWORD="xxxxxxx"
OS_REGION_NAME="xxxxx"

However, when i run my .json, terminal shows that error:

Debug mode enabled. Builds will not be parallelized.

    openstack output will be in this color.

    1 error(s) occurred:

    * Expected HTTP response code [200 203] when accessing [POST http://keystone.xxxxxxxx:5000/v2.0/tokens], but got 401 instead
    {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-04-25 16:11:30 -0500

Since you are providing OpenStack authentication credentials via environment variables, I would suggest removing the "username", "password", and "region" parameters from your JSON file and see if that helps.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-01-27 05:21:44 -0500

Seen: 375 times

Last updated: Jan 27 '16