nova ssh expect special network names

Bug #1188031 reported by Attila Fazekas
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Medium
Unassigned

Bug Description

$nova show 572e46d9-4a96-4f79-95c9-5c666f0b6cf3
+-----------------------------+----------------------------------------------------------+
| Property | Value |
+-----------------------------+----------------------------------------------------------+
| status | ACTIVE |
| updated | 2013-06-06T06:46:54Z |
| OS-EXT-STS:task_state | None |
| key_name | None |
| image | f19 (321f0600-447b-4806-90a9-db9d47aa48a5) |
| hostId | 8b26a2bb7e55825b3e18586a5403673e7acb8a631f2620e0bd084741 |
| OS-EXT-STS:vm_state | active |
| flavor | m1.medium (3) |
| id | 572e46d9-4a96-4f79-95c9-5c666f0b6cf3 |
| security_groups | [{u'name': u'default'}] |
| user_id | 695c21ac81c6499d851f3a560516f19c |
| name | devstack-1 |
| created | 2013-06-06T06:44:07Z |
| tenant_id | b8bc1464db39459d9c3f814b908ae079 |
| OS-DCF:diskConfig | MANUAL |
| metadata | {} |
| novanetwork network | 192.168.32.3 |
| accessIPv4 | |
| accessIPv6 | |
| progress | 0 |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-AZ:availability_zone | nova |
| config_drive | |
+-----------------------------+----------------------------------------------------------+
$ nova ssh --private devstack-1
ERROR: No private addresses found for 'devstack-1'.

]$ nova ssh devstack-1
ERROR: No public addresses found for 'devstack-1'.

In my system I do no have 'private' or 'public' named network, the cli should not expect any network name.

Revision history for this message
lynxn0t (lynxn0t) wrote :

Hi I'm having the same issue. I wonder if this is not the same issue as https://bugs.launchpad.net/nova/+bug/955792

For reference on my openstack install the returned json for the server addresses looks like this :

"addresses": {
            "tms_prod_net": [
                {
                    "OS-EXT-IPS:type": "fixed",
                    "addr": "10.10.20.3",
                    "version": 4
                },
                {
                    "OS-EXT-IPS:type": "floating",
                    "addr": "192.168.10.152",
                    "version": 4
                }
            ]
        },

Maybe the client should look for fixed and floating?

Cheers,

Revision history for this message
Kevin Fox (kevin-fox-y) wrote :

Same issue. Using neutron. accessIPv4 is blank.

Neither nova ssh testinstance or nova ssh --private testinstance works.

            "addresses": {
                "testnet": [
                    {
                        "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:81:80:4b",
                        "version": 4,
                        "addr": "192.168.100.12",
                        "OS-EXT-IPS:type": "fixed"
                    },
                    {
                        "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:81:80:4b",
                        "version": 4,
                        "addr": "XXX.XXX.XXX.XXX",
                        "OS-EXT-IPS:type": "floating"
                    }
                ]
            },

nova ssh should use a lone floating ip on a single network if one exists as a fallback. It probably needs a network name param as a fallback option too so you can specify which private network you want to get to if multiple networks exists.

Revision history for this message
Joe Gordon (jogo) wrote :

We can fix this by using https://tools.ietf.org/html/rfc1918 to determine if a IP address is public or private.

tags: added: low-hanging-fruit
tags: removed: low-hanging-fruit
Changed in python-novaclient:
status: New → Triaged
importance: Undecided → Wishlist
importance: Wishlist → Low
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-novaclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/83077

Revision history for this message
Sahid Orentino (sahid-ferdjaoui) wrote :

I have started to fix this bug by adding 3 new methods that determines whether an ip is public or private.

Changed in python-novaclient:
assignee: nobody → sahid (sahid-ferdjaoui)
Revision history for this message
Dean Troyer (dtroyer) wrote :

I don't think looking for a -1918 address is appropriate here, some clouds will live entirely _within_ -1918 space. And some may be entirely in 'public' space. The distinction that nova-net/neutron make is not the same thing.

Changed in python-novaclient:
assignee: sahid (sahid-ferdjaoui) → nobody
Revision history for this message
Takashi Natsume (natsume-takashi) wrote :

The issue was fixed by the following patch.

Allow selecting the network for doing the ssh with
https://review.openstack.org/#/c/105105/

Changed in python-novaclient:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.