Skip to content
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

Openstack builder connects to wrong endpoint #5201

Closed
JoelFeiner opened this issue Aug 1, 2017 · 9 comments
Closed

Openstack builder connects to wrong endpoint #5201

JoelFeiner opened this issue Aug 1, 2017 · 9 comments

Comments

@JoelFeiner
Copy link

JoelFeiner commented Aug 1, 2017

I am attempting to build an image using the OpenStack provider. It ultimately fails at launching the server with the following message: "Error launching source server: Invalid request due to incorrect syntax or missing required parameters".

It is able to connect to the identity service, verify the flavor and set up the keypair (which might be a local thing).

One thing I am noticing is that tcpdump shows a lot of connections to ec2-54-235-77-197.compute-1.amazonaws.com, whereas when I launch the server with the nova client, there are none. I'm wondering if there's a hardcoded URL in Packer somewhere.

I'm unable to further debug this because Packer or the underlying library does not provide the response from the OpenStack server. From Googling, I see that this is simply not supported at the current juncture.

Packer 1.0.3
Ubuntu 17.04 64-bit
Build output: https://gist.github.com/JoelFeiner/7f7102e3324e4efc00980600217a07aa

Builder config in JSON file:

        {
            "type": "openstack",
            "flavor": "A1.2",
            "source_image": "7925b8a6-b439-4991-9adf-092a202ff16e",
            "ssh_username": "root",
            "networks": [ "bf7a7067-8739-4421-9a08-c940d7fd435d" ],
            "image_name": "{{user `image_type`}}-{{user `image_verson`}}"
        }

Environment variables set:
OS_AUTH_URL
OS_REGION_NAME
OS_IDENTITY_API_VERSION
OS_TENANT_NAME
OS_PASSWORD
OS_USERNAME

@mwhooker
Copy link
Contributor

mwhooker commented Aug 1, 2017

If you can post the info required to reproduce this, we might be able to take a look. However, I suspect the mailing list might be a better place to ask for help.

One thing I am noticing is that tcpdump shows a lot of connections to ec2-54-235-77-197.compute-1.amazonaws.com

hard to say what this connection is without seeing your scripts, but I'm certain this is a node that's launched as part of the build

@JoelFeiner
Copy link
Author

I don't know what I can post that would allow you to reproduce, as you do not have access to our cloud provider and it would not be prudent to share that information. What would be great is some way of getting better output from Packer about why the call failed. If you know of a way to do that, that could make a huge difference. As far as I can tell, that's the only way we can get to something of a repro out of this.

I am not using any Amazon cloud services, but rather an entirely different provider. And as I said in the original message, tcpdump running while using the nova client does not show connections to the Amazon addresses. It could be spurious, but it's concerning.

@mwhooker
Copy link
Contributor

mwhooker commented Aug 1, 2017 via email

@rickard-von-essen
Copy link
Collaborator

rickard-von-essen commented Aug 1, 2017

What is the output of:

openstack catalog list
openstack image show 7925b8a6-b439-4991-9adf-092a202ff16e
openstack flavor show A1.2
openstack network show bf7a7067-8739-4421-9a08-c940d7fd435d

@JoelFeiner
Copy link
Author

openstack catalog list: https://gist.github.com/JoelFeiner/5857f90ce727606ccd3017fa30eae688
openstack image show 'CentOS 7':

+------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| Field            | Value                                                                                                                                   |
+------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| checksum         | XXX                                                                                                        |
| container_format | bare                                                                                                                                    |
| created_at       | 2017-07-25T21:50:44Z                                                                                                                    |
| disk_format      | qcow2                                                                                                                                   |
| file             | /path/to/file                                                                                    |
| id               | SOME_GUID                                                                                                    |
| min_disk         | 10                                                                                                                                      |
| min_ram          | 256                                                                                                                                     |
| name             | CentOS 7                                                                                                                                |
| owner            | SOME_GUID                                                                                                        |
| properties       | architecture='x86_64', build_version='48', distro='centos', iweb__1__restricted='0', iweb__1__visible='1', os_type='linux', version='7' |
| protected        | False                                                                                                                                   |
| schema           | /v2/schemas/image                                                                                                                       |
| size             | 755412480                                                                                                                               |
| status           | active                                                                                                                                  |
| tags             |                                                                                                                                         |
| updated_at       | 2017-07-25T21:52:12Z                                                                                                                    |
| virtual_size     | None                                                                                                                                    |
| visibility       | public                                                                                                                                  |
+------------------+-----------------------------------------------------------------------------------------------------------------------------------------+

openstack flavor show A1.1

+---------------------------+---------------------------------------------------------------------------------------------------+
| Field                     | Value                                                                                             |
+---------------------------+---------------------------------------------------------------------------------------------------+
| OS-FLV-EXT-DATA:ephemeral | 0                                                                                                 |
| access_project_ids        | None                                                                                              |
| disk                      | 20                                                                                                |
| id                        | A1.1                                                                                              |
| name                      | A1.1                                                                                              |
| properties                | cpu_allocation_ratio='3', quota:vif_inbound_average='102400', quota:vif_outbound_average='102400' |
| ram                       | 1024                                                                                              |
| rxtx_factor               | 1.0                                                                                               |
| swap                      |                                                                                                   |
| vcpus                     | 1                                                                                                 |
+---------------------------+---------------------------------------------------------------------------------------------------+

openstack network show XXX

+---------------------------+----------------------------------------------------------------------------+
| Field                     | Value                                                                      |
+---------------------------+----------------------------------------------------------------------------+
| admin_state_up            | UP                                                                         |
| availability_zone_hints   |                                                                            |
| availability_zones        |                                                                            |
| created_at                | None                                                                       |
| description               | None                                                                       |
| dns_domain                | None                                                                       |
| id                        | SOME_GUID                                       |
| ipv4_address_scope        | None                                                                       |
| ipv6_address_scope        | None                                                                       |
| is_default                | None                                                                       |
| mtu                       | 0                                                                          |
| name                      | XXX                                                         |
| port_security_enabled     | False                                                                      |
| project_id                | None                                                                       |
| provider:network_type     | vlan                                                                       |
| provider:physical_network | physnet0                                                                   |
| provider:segmentation_id  | 2026                                                                       |
| qos_policy_id             | None                                                                       |
| revision_number           | None                                                                       |
| router:external           | Internal                                                                   |
| segments                  | None                                                                       |
| shared                    | False                                                                      |
| status                    | ACTIVE                                                                     |
| subnets                   | SOME_GUID, SOME_GUID |
| updated_at                | None                                                                       |
+---------------------------+----------------------------------------------------------------------------+

@rickard-von-essen
Copy link
Collaborator

Just a minor thing, in your OpenStack you use flavor A1.2 but then you run:

openstack flavor show A1.1

@JoelFeiner
Copy link
Author

I switched to using A1.1 so that the image can be used for A1.1 instances, as well as the higher level ones. The only difference is that A1.1 has half as many CPUs, half as much RAM and half as much hard-drive space as A1.2. It's not relevant to this issue.

@ghost
Copy link

ghost commented Apr 21, 2021

This issue has been automatically migrated to hashicorp/packer-plugin-openstack#21 because it looks like an issue with that plugin. If you believe this is not an issue with the plugin, please reply to hashicorp/packer-plugin-openstack#21.

@ghost
Copy link

ghost commented May 22, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators May 22, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants