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

salt-cloud to rackspace uses public ip instead of private #34224

Closed
tehsu opened this issue Jun 22, 2016 · 8 comments
Closed

salt-cloud to rackspace uses public ip instead of private #34224

tehsu opened this issue Jun 22, 2016 · 8 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 Regression The issue is a bug that breaks functionality known to work in previous releases. RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around ZD The issue is related to a Zendesk customer support ticket. ZRELEASED - 2016.3.2
Milestone

Comments

@tehsu
Copy link

tehsu commented Jun 22, 2016

Description of Issue/Question

Setup

Building a server out to Rackspace using Nova

private_ips: 
- 2034:4330:7821:13:be76:4eff:fe06:3e94 
- 114.249.241.193 
- 10.111.232.42 
public_ips: 
- 2034:4330:7821:13:be76:4eff:fe06:3e94 
- 114.249.241.193 

It should be

private_ips: 
- 10.111.232.42 
public_ips: 
- 2034:4330:7821:13:be76:4eff:fe06:3e94 
- 114.249.241.193 

Steps to Reproduce Issue

Build a server to rackspace using nova and 2016.3 and let it fail. The Private IPs will include the Public IP

Versions Report

Salt Version:
Salt: 4.2.1

Dependency Versions:
cffi: Not Installed
cherrypy: 3.2.3
dateutil: Not Installed
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
Jinja2: 2.7.3
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.20.2
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.7
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 14.5.0
RAET: Not Installed
smmap: 0.8.1
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5

System Versions:
dist: centos 6.8 Final
machine: x86_64
release: 2.6.32-504.3.3.el6.x86_64
system: Linux
version: CentOS 6.8 Final

I removed this block of code from nova.py and I was able to build out the server and the private IP listed no longer include the public IPs

        if not result:
            temp_dd = node.get('addresses', {})
            for k, addr_ll in temp_dd.iteritems():
                for addr_dd in addr_ll:
                    addr = addr_dd.get('addr', None)
                    if addr is not None:
                        result.append(addr.strip())
@rickh563
Copy link

ZD-823

@rickh563 rickh563 added the ZD The issue is related to a Zendesk customer support ticket. label Jun 22, 2016
@Ch3LL
Copy link
Contributor

Ch3LL commented Jun 24, 2016

@tehsu would you mind sharing your provider file for rackspace and the version of apache-libcloud you are on? Thanks

@Ch3LL Ch3LL added the info-needed waiting for more info label Jun 24, 2016
@Ch3LL Ch3LL added this to the Blocked milestone Jun 24, 2016
@Ch3LL
Copy link
Contributor

Ch3LL commented Jun 24, 2016

also i think it might be worth mentioning that this is the PR that introduced that code. Also I forgot to mention to make sure your provider file is sanitized :)

@tehsu
Copy link
Author

tehsu commented Jun 27, 2016

rackspace:
  minion:
    master: salt
  identity_url: 'https://identity.api.rackspacecloud.com/v2.0/'
  driver: nova
  ssh_interface: private_ips
  rackconnect: True

as for apache-libcloud, it was on 0.20.0 and now its on 1.0

@Ch3LL
Copy link
Contributor

Ch3LL commented Jun 29, 2016

@tehsu thanks for the additional information. Looks like I am able to replicate this issue with the following test case:

salt-cloud -p profile ch3ll-vm --no-deploy

and the outputs at the end:

    private_ips:
        - 2001:4802:7802:104:be76:4eff:fe20:1aa5
        - 104.130.12.231
        - 10.208.229.7
    public_ips:
        - 2001:4802:7802:104:be76:4eff:fe20:1aa5
        - 104.130.12.231

and my provider rackspace config file:

rackspace:
  identity_url: 'https://identity.api.rackspacecloud.com/v2.0/'
  compute_region: <region>
  user: <user>
  api_key: <apikey>
  os_auth_plugin: rackspace
  ssh_interface: private_ips
  tenant: <tenant>
  driver: nova

And #32138 is the first bad commit that git bisect shows.

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior P2 Priority 2 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Salt-Cloud RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Regression The issue is a bug that breaks functionality known to work in previous releases. and removed info-needed waiting for more info labels Jun 29, 2016
@meggiebot meggiebot added ZRELEASED - 2016.3.2 fixed-pls-verify fix is linked, bug author to confirm fix labels Jun 30, 2016
@meggiebot meggiebot modified the milestones: C 7, Blocked Jun 30, 2016
@meggiebot meggiebot added TEAM Core and removed fixed-pls-verify fix is linked, bug author to confirm fix labels Jun 30, 2016
@gtmanfred
Copy link
Contributor

@tehsu are you on rackconnect v2 or rackconnect v3?

@tehsu
Copy link
Author

tehsu commented Jul 5, 2016

Rackconnect v2

@gtmanfred
Copy link
Contributor

This should now be fixed by removing that block in the 2016.3 branch, the sorting of ips was added into a higher up portion of the code just before that block was added. It should be available in 2016.3.2, and this issue will be closed when the fix is merged into the develop branch.

@gtmanfred gtmanfred added the fixed-pls-verify fix is linked, bug author to confirm fix label Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 Regression The issue is a bug that breaks functionality known to work in previous releases. RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around ZD The issue is related to a Zendesk customer support ticket. ZRELEASED - 2016.3.2
Projects
None yet
Development

No branches or pull requests

5 participants