Skip to content

Nova driver broken for 2015.8.[1-3] #29666

Closed

Description

@tminn

I upgraded to 2015.8.1 today. My environment is using centos 7 as OS.
Using salt-cloud nova driver with Openstack (kilo) is broken .

--snip--

[INFO    ] salt-cloud starting
[WARNING ] /usr/lib/python2.7/site-packages/salt/cloud/clouds/openstack.py:208: DeprecationWarning: This driver has been deprecated and will be removed in the Carbon release of Salt. Please use the nova driver instead.

ostack:
    ----------
    nova:
        ----------
        rundeck_c71:
            ----------
            id:
                6f5175c1-65b7-4344-98aa-508de901bc78
            image:
                73b3c7f8-ec5d-465b-bfbe-7c83adcacb45
            private_ips:
                - 172.16.200.198
                - 10.4.14.175
            public_ips:
            size:
                4
            state:
                ACTIVE
        smaster71:
            ----------
            id:
                fec4086b-37ff-4400-9ffc-711b633a5711
            image:
                73b3c7f8-ec5d-465b-bfbe-7c83adcacb45
            private_ips:
                - 172.16.200.131
                - 10.4.14.179
            public_ips:
            size:
                7
            state:
                ACTIVE
ostack_libcloud:
    ----------
    openstack:
        ----------
        rundeck_c71:
            ----------
            id:
                6f5175c1-65b7-4344-98aa-508de901bc78
            image:
                None
            name:
                rundeck_c71
            private_ips:
                - 172.16.200.198
            public_ips:
                - 10.4.14.175
            size:
                None
            state:
                RUNNING
        smaster71:
            ----------
            id:
                fec4086b-37ff-4400-9ffc-711b633a5711
            image:
                None
            name:
                smaster71
            private_ips:
                - 172.16.200.131
            public_ips:
                - 10.4.14.179
            size:
                None
            state:
                RUNNING
--snip--

with libcloud the listing of public and private ip is correct.
with nova driver it is wrong.

Also I'm unable to launch an instance with nova driver. I get the following message

--snip--

 salt-cloud -p centos7_medium  t1
[INFO    ] salt-cloud starting
[INFO    ] Creating Cloud VM t1
[INFO    ] Salt interface set to: False
[INFO    ] Creating Cloud VM t2
[INFO    ] Salt interface set to: False
t1:
    ----------
    Error:
        A valid IP address was not found

--snip--

# My provider config

--snip--
ostack:
  ignore_cidr: 10.4.14.0/24
  minion:
    master: 172.16.200.131
  identity_url: 'http://10.4.13.61:5000/v2.0'
  compute_name: nova
  compute_region: RegionOne
  user: redacted
  tenant: osp
  password: redacted
  driver: nova
  securitygroup: base
  networks:
    - net-id: dc484f4b-65d4-4f28-9d2e-4b43b7990e57       
    - net-id: e4d002b3-9fec-4553-88d4-ab2ff4d5695f
ostack_libcloud:
  ignore_cidr: 10.4.14.0/24
  minion:
    master: 172.16.200.131
  identity_url: 'http://10.4.13.61:5000'
  compute_name: nova
  compute_region: RegionOne
  user: redacted
  tenant: osp
  password: redacted
  driver: openstack
  securitygroup: base
  networks:
    - fixed:
      - dc484f4b-65d4-4f28-9d2e-4b43b7990e57
    - floating:
      - e4d002b3-9fec-4553-88d4-ab2ff4d5695f

--snip--

I tested this with salt 2015.8.3 . The results are still the same.

Activity

  1. Ch3LL commented on Dec 14, 2015

    @Ch3LL
    Contributor

    @tminn thanks for the report.

  2. added
    P3
    bug
    RIoT
    severity-medium
    on Dec 14, 2015
  3. added this to the Approved milestone on Dec 14, 2015
  4. erchn commented on Dec 15, 2015

    @erchn
    Contributor

    I believe this was already fixed by PR #28182

  5. rallytime commented on Dec 15, 2015

    @rallytime
    Contributor

    Thanks for pointing that out @erchn - that is really helpful.

    @tminn The pull request that @erchn referenced above should be available in the 2015.8.3 version of salt. Can you give that a try and let us know if you're still seeing problems?

  6. tminn commented on Dec 18, 2015

    @tminn
    Author

    I can confirm the issue persist on 2015.8.3

  7. rallytime commented on Dec 18, 2015

    @rallytime
    Contributor

    Thanks for checking @tminn.

    @erchn If you've got some free cycles, it'd be swell if you could take a look at this one again, since you've been helping out on the Nova driver. If not, that's ok, too, and we can grab it later.

  8. erchn commented on Dec 18, 2015

    @erchn
    Contributor

    Technically @tminn your provider config should be setting ssh_interface: private_ips, even though the 10 net IP is listed under private. I believe that the openstack driver working is actually a bug. I would try setting the ssh_interface configuration and try again, it should ignore the 10.4.x.x address as you'd expect, and choose the 172.16.x.x interface.

  9. erchn commented on Dec 18, 2015

    @erchn
    Contributor

    I take it back, it's not a bug, but I believe it's due to the use of "floating IPs", which are assigned by default to the public_ips list, when found. That functionality doesn't seem to exist in Nova, at least not in the Nova clouds wrapper. But setting private_ips should solve the vm creation issue.

  10. tminn commented on Dec 21, 2015

    @tminn
    Author

    I have set ssh_interface: private_ips in my profile conf. I will test if this option has an effect when done it is configured under provider.

    --snip-- 
    centos7_medium:
      driver: ostack
      size: m1.medium
      image: 86f60c96-447f-47ff-b686-35ac8ff4fa69
      ssh_interface: private_ips
      ignore_cidr: 10.4.14.0/24
      ssh_username: cclusr
      key_name: stack-rsa
      ssh_key_name: stack-rsa
      ssh_key_file: /home/salt/opstack/ssh/stack_rsa
      delete_sshkeys: True
      sync_after_install: all
      flush_mine_on_destroy: True
      script: /etc/salt/cloud.deploy.d/deploy.sh
    --snip--
    
  11. tminn commented on Dec 29, 2015

    @tminn
    Author

    I can confirm. The moving the config "ssh_interface: private_ips" to provider has no effect.

  12. 13 remaining items

  13. gtmanfred commented on Feb 12, 2016

    @gtmanfred
    Contributor

    Can you check if this pr fixes your problems #31120 ?

    Thanks
    Daniel

  14. tminn commented on Feb 18, 2016

    @tminn
    Author

    Could you tell me this pr is in 2015.8.7 or should I test 2016.3 ?

  15. gtmanfred commented on Feb 18, 2016

    @gtmanfred
    Contributor

    It will be in 2015.8.8 and 2016.3.1
    On Thu, Feb 18, 2016 at 3:39 AM tminn [email protected] wrote:

    Could you tell me this pr is in 2015.8.7 or should I test 2016.3 ?

    —
    Reply to this email directly or view it on GitHub
    #29666 (comment).

  16. rallytime commented on Feb 18, 2016

    @rallytime
    Contributor

    This change will be in 2015.8.8 as stated above, but I recently did a merge-forward to the 2016.3 branch in #31322, which includes this fix. So it will be available in 2016.3.0, too. :)

  17. added
    fixed-pls-verify
    on Feb 18, 2016
  18. tminn commented on Feb 19, 2016

    @tminn
    Author

    Checked could not find tags/v2015.8.8 but works for 2016.3. Now I can deploy an instance without floating IP

    --snip--
    [salt@smaster salt(keystone_adm)]$ salt-cloud --version
    salt-cloud 2016.3.0rc1-1178-g64707d1 (Boron)
    --snip--

    The issue I'm running into is same as before. Please see output from Jan 19. What works for now is I can pass private network uuid in Network and It does work without floating-ip. Is there a different synatx for passing floating-ip ?

    hth

  19. gtmanfred commented on Feb 19, 2016

    @gtmanfred
    Contributor

    For the nova driver, i don't know what the output of a floating ip looks like in the addresses dictionary.

    But to attach a floating-ip, you should just have to follow the same format as attaching a private network, and then put in the stuff that you would pass to novaclient for that.

                     [--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,port-id=port-uuid>]
    --
      --nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,port-id=port-uuid>
                                    Create a NIC on the server. Specify option
                                    multiple times to create multiple NICs. net-
                                    id: attach NIC to network with this UUID
                                    (either port-id or net-id must be provided),
                                    v4-fixed-ip: IPv4 fixed address for NIC
    
  20. tminn commented on Feb 22, 2016

    @tminn
    Author

    I think, I know why this might be happening. We need a mechanism to specify that we need to associate floating ip.

    This is what is happening on compute_node of Openstack

    --snip--
    2016-02-22 11:01:18.963 14649 WARNING nova.compute.resource_tracker [-] [instance: ed3f4495-8354-4595-b96c-998b736fba9e] Node field should not be set on the instance until resources have been claimed.
    2016-02-22 11:01:18.964 14649 AUDIT nova.compute.claims [-] [instance: ed3f4495-8354-4595-b96c-998b736fba9e] Attempting claim: memory 1024 MB, disk 10 GB
    2016-02-22 11:01:18.964 14649 AUDIT nova.compute.claims [-] [instance: ed3f4495-8354-4595-b96c-998b736fba9e] Total memory: 64158 MB, used: 12800.00 MB
    2016-02-22 11:01:18.964 14649 AUDIT nova.compute.claims [-] [instance: ed3f4495-8354-4595-b96c-998b736fba9e] memory limit: 51326.40 MB, free: 38526.40 MB
    2016-02-22 11:01:18.965 14649 AUDIT nova.compute.claims [-] [instance: ed3f4495-8354-4595-b96c-998b736fba9e] Total disk: 22345 GB, used: 210.00 GB
    2016-02-22 11:01:18.965 14649 AUDIT nova.compute.claims [-] [instance: ed3f4495-8354-4595-b96c-998b736fba9e] disk limit not specified, defaulting to unlimited
    2016-02-22 11:01:18.992 14649 AUDIT nova.compute.claims [-] [instance: ed3f4495-8354-4595-b96c-998b736fba9e] Claim successful
    2016-02-22 11:01:19.311 14649 INFO nova.scheduler.client.report [-] Compute_service record updated for ('cn01.novalocal.de', 'cn01.novalocal.de')
    2016-02-22 11:01:19.377 14649 INFO nova.scheduler.client.report [-] Compute_service record updated for ('cn01.novalocal.de', 'cn01.novalocal.de')
    2016-02-22 11:01:19.401 14649 ERROR nova.compute.manager [-] Instance failed network setup after 1 attempt(s)
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager Traceback (most recent call last):
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1708, in _allocate_network_async
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager dhcp_options=dhcp_options)
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 337, in allocate_for_instance
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager self._check_external_network_attach(context, nets)
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 248, in _check_external_network_attach
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager network_uuid=net['id'])
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager ExternalNetworkAttachForbidden: It is not allowed to create an interface on external network e4d002b3-9fec-4553-88d4-ab2ff4d5695f
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager
    2016-02-22 11:01:19.531 14649 INFO nova.virt.libvirt.driver [-] [instance: ed3f4495-8354-4595-b96c-998b736fba9e] Creating image
    2016-02-22 11:01:19.853 14649 ERROR nova.compute.manager [-] [instance: ed3f4495-8354-4595-b96c-998b736fba9e] Instance failed to spawn
    --snip--

    hth

  21. gtmanfred commented on Feb 22, 2016

    @gtmanfred
    Contributor

    That will be coming in the rewrite with shade
    On Mon, Feb 22, 2016 at 4:07 AM tminn [email protected] wrote:

    I think, I know why this might be happening. We need a mechanism to
    specify that we need to associate floating ip.

    This is what is happening on compute_node of Openstack

    --snip--
    2016-02-22 11:01:18.963 14649 WARNING nova.compute.resource_tracker [-]
    [instance: ed3f4495-8354-4595-b96c-998b736fba9e] Node field should not be
    set on the instance until resources have been claimed.
    2016-02-22 11:01:18.964 14649 AUDIT nova.compute.claims [-] [instance:
    ed3f4495-8354-4595-b96c-998b736fba9e] Attempting claim: memory 1024 MB,
    disk 10 GB
    2016-02-22 11:01:18.964 14649 AUDIT nova.compute.claims [-] [instance:
    ed3f4495-8354-4595-b96c-998b736fba9e] Total memory: 64158 MB, used:
    12800.00 MB
    2016-02-22 11:01:18.964 14649 AUDIT nova.compute.claims [-] [instance:
    ed3f4495-8354-4595-b96c-998b736fba9e] memory limit: 51326.40 MB, free:
    38526.40 MB
    2016-02-22 11:01:18.965 14649 AUDIT nova.compute.claims [-] [instance:
    ed3f4495-8354-4595-b96c-998b736fba9e] Total disk: 22345 GB, used: 210.00 GB
    2016-02-22 11:01:18.965 14649 AUDIT nova.compute.claims [-] [instance:
    ed3f4495-8354-4595-b96c-998b736fba9e] disk limit not specified, defaulting
    to unlimited
    2016-02-22 11:01:18.992 14649 AUDIT nova.compute.claims [-] [instance:
    ed3f4495-8354-4595-b96c-998b736fba9e] Claim successful
    2016-02-22 11:01:19.311 14649 INFO nova.scheduler.client.report [-]
    Compute_service record updated for ('cn01.novalocal.de', '
    cn01.novalocal.de')
    2016-02-22 11:01:19.377 14649 INFO nova.scheduler.client.report [-]
    Compute_service record updated for ('cn01.novalocal.de', '
    cn01.novalocal.de')
    2016-02-22 11:01:19.401 14649 ERROR nova.compute.manager [-] Instance
    failed network setup after 1 attempt(s)
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager Traceback (most
    recent call last):
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager File
    "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1708, in
    _allocate_network_async
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager
    dhcp_options=dhcp_options)
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager File
    "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 337,
    in allocate_for_instance
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager
    self._check_external_network_attach(context, nets)
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager File
    "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 248,
    in _check_external_network_attach
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager
    network_uuid=net['id'])
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager
    ExternalNetworkAttachForbidden: It is not allowed to create an interface on
    external network e4d002b3-9fec-4553-88d4-ab2ff4d5695f
    2016-02-22 11:01:19.401 14649 TRACE nova.compute.manager
    2016-02-22 11:01:19.531 14649 INFO nova.virt.libvirt.driver [-] [instance:
    ed3f4495-8354-4595-b96c-998b736fba9e] Creating image
    2016-02-22 11:01:19.853 14649 ERROR nova.compute.manager [-] [instance:
    ed3f4495-8354-4595-b96c-998b736fba9e] Instance failed to spawn
    --snip--

    hth

    —
    Reply to this email directly or view it on GitHub
    #29666 (comment).

  22. tminn commented on Feb 22, 2016

    @tminn
    Author

    Thanks. I'm willing to test the shade rewrite. Is shade implementation planned for 2016.30? For now I'm sticking with 2015.5.x release as 2015.8.x is broken for my usecase.

  23. gtmanfred commented on Feb 22, 2016

    @gtmanfred
    Contributor

    It won't be in until the next major release, so the next 2016 release
    On Mon, Feb 22, 2016 at 10:28 AM tminn [email protected] wrote:

    Thanks. I'm willing to test the shade rewrite. Is shade implementation
    planned for 2016.30? For now I'm sticking with 2015.5.x release as 2015.8.x
    is broken for my usecase.

    —
    Reply to this email directly or view it on GitHub
    #29666 (comment).

  24. cachedout commented on Jun 3, 2016

    @cachedout
    Contributor

    @gtmanfred Could you please update this with information about what did and didn't make it into 2016.3 that might solve this issue?

  25. gtmanfred commented on Jun 3, 2016

    @gtmanfred
    Contributor

    fixes for public_ip and private_ip made it into 2016.3.

    associating the floating_ip works in some cases but has a race condition sometimes if your cloud is fast enough that I am working on fixing in 2015.8 and 2016.3 soonish.

  26. gtmanfred commented on Nov 11, 2016

    @gtmanfred
    Contributor

    closing this because 2016.11 rc2 is out, please go test it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3RIoTSalt-Cloudbugfixed-pls-verifyseverity-medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions