Ask Your Question

jlausuch's profile - activity

2017-02-02 11:40:42 -0500 received badge  Famous Question (source)
2016-07-13 16:31:23 -0500 commented answer Unable to delete port

I am on Mitaka now and haven´t seen the issue so far... Maybe that´s the reason. Thanks!

2016-07-13 06:41:11 -0500 commented answer Unable to delete port

Where should I have those options?

2016-07-13 06:32:59 -0500 received badge  Notable Question (source)
2016-07-12 21:51:34 -0500 received badge  Self-Learner (source)
2016-07-12 21:51:34 -0500 received badge  Teacher (source)
2016-07-12 04:55:32 -0500 answered a question nova console-log doesn't show the whole output

It isn't a problem of OpenStack or Nova. It seems that Cirros' ssh client (Dropbear) doesn't place the output to stdout if not run directly by command line. It doesn't show anything if it's executed from other sources like Cron or in this case Userdata.

I found the explanation here: https://mplicka.cz/en/blog/reading-remote-output-from-ssh-client-when-run-in-cron-on-openwrt

In my case, just the reverse redirection made it work...

ssh -y -i /home/cirros/.ssh/id_rsa cirros@10.10.10.12 hostname </dev/zero

2016-07-12 03:22:52 -0500 received badge  Popular Question (source)
2016-07-11 14:29:28 -0500 commented answer nova console-log doesn't show the whole output

It doesn't work either. I have tried some combinations like >&2 &>&2 &>&1. The funny thing is that if I add echo hello in the loop I can see "hello" in the console-log output...

2016-07-11 10:34:29 -0500 asked a question nova console-log doesn't show the whole output

I am creating 2 VMs with the following userdata in the first one:

#!/bin/sh
while true; do
 ssh -y -i /home/cirros/.ssh/id_rsa cirros@10.10.10.12 hostname
 sleep 1
done

10.10.10.12 is the IP of the second VM (fixed ips).

When I login to VM1 (via ip netns) I run the metadata manually like this:

$/run/cirros/datasource/data/user-data
Host '10.10.10.12' key accepted unconditionally.
(fingerprint md5 dc:c4:c2:f0:37:3c:f7:33:46:8c:d6:20:20:98:0c:95)
vm-test2

Host '10.10.10.12' key accepted unconditionally.
(fingerprint md5 dc:c4:c2:f0:37:3c:f7:33:46:8c:d6:20:20:98:0c:95)
vm-test2
...

Which is the output I want. However, when looking at nova console-log of the VM1 on the OpenStack controller:

$ nova console-log vm-test1
Host '10.10.10.12' key accepted unconditionally.
(fingerprint md5 dc:c4:c2:f0:37:3c:f7:33:46:8c:d6:20:20:98:0c:95)

Host '10.10.10.12' key accepted unconditionally.
(fingerprint md5 dc:c4:c2:f0:37:3c:f7:33:46:8c:d6:20:20:98:0c:95)
...

I see it attempts to ssh MV2 (and it doesn't complain) but it doesn't give the output that I expect vm-test2.

Any ideas why?

I am using Mitaka on Ubuntu 14.04.

2016-06-02 03:14:36 -0500 answered a question cinder python module logger collides with my logger

The solution is :

logger = logging.getLogger("test")
self.logger.propagate = 0
2016-06-01 03:31:15 -0500 received badge  Popular Question (source)
2016-05-26 01:33:55 -0500 received badge  Student (source)
2016-05-25 04:49:19 -0500 asked a question cinder python module logger collides with my logger

I want to have log handling in a script I'm writing, but when I import cinderclient python module I get duplicated log outputs. This is the script:

import logging

#from cinderclient.v2 import client as cinderclient

logger = logging.getLogger("test")
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - '
                              '%(levelname)s - %(message)s')
ch = logging.StreamHandler()
ch.setFormatter(formatter)
ch.setLevel(logging.DEBUG)
logger.addHandler(ch)
logger.debug("this is a test...")

This is the output when I execute this script without importing cinder module:

$python test.py 
2016-05-25 09:43:26,753 - test - DEBUG - this is a test...

But when I uncomment the cinder import line:

$python test.py 
2016-05-25 09:44:47,375 - test - DEBUG - this is a test...
DEBUG:test:this is a test...

I get a second output without my predefined formatting.

My cinder client is python-cinderclient (1.7.0). And this doesn't happen with nova/neutron (from neutronclient.v2_0 import client as neutronclient or from novaclient import client as novaclient).

Does anyone know why?

2015-07-27 02:29:45 -0500 received badge  Famous Question (source)
2015-07-02 07:57:10 -0500 received badge  Famous Question (source)
2015-06-12 14:07:48 -0500 received badge  Notable Question (source)
2015-06-09 05:02:09 -0500 received badge  Enthusiast
2015-06-08 11:28:49 -0500 commented answer Keystone: unable to use the public endpoint

Ok. Thanks a lot!

2015-06-08 03:24:04 -0500 answered a question Keystone: unable to use the public endpoint

Ok. That clarifies my question. Thanks!

My problem is that I run a tool which uses keystone CLI internally, and cannot change that code (at least easily) using --os-service-endpoint. I was trying to reproduce the problem for this example using a simple keystone command.

So, I guess my only option for now is to have an IP in the OS-mgmt network, right?

2015-06-08 02:29:38 -0500 received badge  Notable Question (source)
2015-06-07 23:21:19 -0500 received badge  Popular Question (source)
2015-06-07 17:40:54 -0500 received badge  Editor (source)
2015-06-07 17:35:05 -0500 asked a question Keystone: unable to use the public endpoint

Hi,

I am trying to run commands from an external machine using the public API towards my OpenStack installation. This is the error I get for example when trying keystone commands:

keystone  user-list
Unable to establish connection to http://192.168.0.2:35357/v2.0/users
  • The public ip range is 172.30.9.0/24 and the OS management is 192.168.0.2/24.
  • The env var OS_AUTH_URL is set to http://172.30.9.70:5000/v2.0

Only when I configure an IP in the mgmt range from my external machine everything works. Actually, keystone catalog shows (along with other things):

Service: identity
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
|   adminURL  |  http://192.168.0.2:35357/v2.0   |
|      id     | 341bfbcf86f44f219357f8527c3c8b15 |
| internalURL |   http://192.168.0.2:5000/v2.0   |
|  publicURL  |   http://172.18.0.70:5000/v2.0   |
|    region   |            RegionOne             |
+-------------+----------------------------------+

Also,

$ keystone discover
Keystone found at http://172.18.0.70:5000/v2.0
    - supports version v2.0 (stable) here http://172.18.0.70:5000/v2.0/
        - and OS-REVOKE: OpenStack Revoke API
        - and OS-FEDERATION: OpenStack Federation APIs
        - and OS-KSCRUD: OpenStack Keystone User CRUD
        - and OS-EC2: OpenStack EC2 API
        - and OS-SIMPLE-CERT: OpenStack Simple Certificate API

But I want to avoid having an IP in the OS-mgmt range on my external machine. What am I missing here, if I'm telling OS to use 172.30.9.0/24 with OS_AUTH_URL ?

2015-06-02 16:27:59 -0500 received badge  Popular Question (source)
2015-06-02 10:33:06 -0500 answered a question Unable to delete port

Answering to all of you. I tried to update the port so the device_owner is None and then I can delete the port.

Strange, that "neutron router-list" does not show any router and Horizon either, but:

[root@oscontroller1 ~(openstack_admin)]# ip netns
qrouter-cf4bbaa6-8f2b-4116-9b68-71c08058d7b2
qrouter-9819e732-6cbc-423a-b6ca-6f2e9bafd817
qrouter-c594bde6-cd4c-42fa-ad7f-7fa86d5a18b1
qrouter-b869ad30-fb88-4ecb-93a4-56092fe45fa9
qrouter-5c51e891-a3c1-4533-863a-caff7e540987
qrouter-bdca762b-308a-4734-bab1-8d9160703a45
qrouter-10186907-d551-4c5d-9e8e-9c554a74e4c4
qrouter-da37653f-a962-4c38-841a-6069f5859375
qrouter-1ddaa4f5-5b90-4890-ab88-742bafe17520
qrouter-95adfb86-6361-4c7a-8aaf-91ebc35c1329
qrouter-05ed9163-c6d8-41d0-aa8a-4e64ee0c984e
qrouter-8a4f8c2a-528c-4527-b2f6-4afabb8e0ed8
qrouter-616f71cb-3ee5-4d0a-9af2-edd4c0c4718e
qrouter-d219f245-3fe3-454b-aa83-65c026718be7
qrouter-cb6e68e5-8602-4921-8eae-0087eef54200
qrouter-b1e89625-fb8d-4bdc-9895-2c069c812a81
qrouter-83f68bdf-2717-4e73-9325-47914a892d4e
qrouter-2ba4ff41-806a-4780-a690-e259a142e27c
qrouter-fa3f6301-5732-4b17-9946-b68b848de541
qrouter-0a9627b6-21e9-4d04-8fad-332f825c3f3b
qrouter-b1955d54-0a74-4b8a-9c4a-f1774b0cd532
qrouter-7af0ffd5-f99a-4ade-9c7c-c944936f2877
qrouter-6e55b578-568f-4cfe-b867-26bb8cbd8937
qrouter-7c3e8898-731d-4a71-a8be-b3632be53554




MariaDB [(none)]> select * from neutron.ipallocations;
+--------------------------------------+---------------+--------------------------------------+--------------------------------------+
| port_id                              | ip_address    | subnet_id                            | network_id                           |
+--------------------------------------+---------------+--------------------------------------+--------------------------------------+
| 1bfd8c5d-2ce8-47fd-afdd-ab205e992d80 | 2003::1       | 8f790f7d-2fa7-4e0e-9ebb-2f4bf21c4f94 | f01ab808-75e0-4993-8950-befb6a505a07 |
| 7f23187d-95c3-4d31-98cd-2997650ddcc0 | 2003::124     | 8f790f7d-2fa7-4e0e-9ebb-2f4bf21c4f94 | f01ab808-75e0-4993-8950-befb6a505a07 |
| d7caf61b-f946-430a-b367-274266bbee5d | 172.30.10.194 | 5f8eb000-a797-416b-8d20-3153c94a2cfe | b869ad30-fb88-4ecb-93a4-56092fe45fa9 |
+--------------------------------------+---------------+--------------------------------------+--------------------------------------+
3 rows in set (0.00 sec)

MariaDB [(none)]> select * from neutron.ports;
+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+-------------------------------------------------------------------------------+--------------------------+
| tenant_id                        | id                                   | name | network_id                           | mac_address       | admin_state_up | status | device_id                                                                     | device_owner             |
+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+-------------------------------------------------------------------------------+--------------------------+
| b7e3c98141c547c48d3e8fa8d5b354cf | 1bfd8c5d-2ce8-47fd-afdd-ab205e992d80 |      | f01ab808-75e0-4993-8950-befb6a505a07 | fa:16:3e:df:9a:74 |              1 | DOWN   | 77609028-c7fc-4de3-8714-cb4f50c73608                                          | network:router_interface |
| b7e3c98141c547c48d3e8fa8d5b354cf | 7f23187d-95c3-4d31-98cd-2997650ddcc0 |      | f01ab808-75e0-4993-8950-befb6a505a07 | fa:16:3e:da:cd:1a |              1 | DOWN   | dhcp05b39bfd-2caa-546e-865c-e53aafde44a4-f01ab808-75e0-4993-8950-befb6a505a07 | network:dhcp             |
| b7e3c98141c547c48d3e8fa8d5b354cf | d7caf61b-f946-430a-b367-274266bbee5d |      | b869ad30-fb88-4ecb-93a4-56092fe45fa9 | fa:16:3e:b7:74:4c |              1 | DOWN   | dhcp05b39bfd-2caa-546e-865c-e53aafde44a4-b869ad30-fb88-4ecb-93a4-56092fe45fa9 | network:dhcp             |
+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+-------------------------------------------------------------------------------+--------------------------+
3 rows in set (0.00 sec)
2015-06-01 19:36:45 -0500 answered a question cirros instance cannot get ip address

Hi,

I have exactly the same issue. Have checked the attached router port and its ACTIVE.

I use a Cirros VM on that private net, creating a port before. Something like this:

[creation of private network,subnet and router]
neutron port-create --fixed-ip subnet_id=$SUBNET_ID,ip_address=192.168.120.150 $NET_ID
neutron port-list | grep 120.150
| d7d4d8fd-3aaa-486a-b9cf-75719bbe503d |      | fa:16:3e:10:62:51 | {"subnet_id": "d00279d1-9d8d-41d0-9776-680233496c85", "ip_address": "192.168.120.150"} |

nova boot vm-test --image $IMAGE_ID --flavor 1 --nic port-id=d7d4d8fd-3aaa-486a-b9cf-75719bbe503d

[jenkins-ci@lf_pod2 ~]$ nova list | grep vm-test
| 0b381c32-ee29-443e-a8e2-b1ea01e648e9 | vm-test     | ACTIVE | -          | Running     | test-net=192.168.120.150     |

The VM boots fine, but looking at the console, still:

...
Starting network...
udhcpc (v1.20.1) started
Sending discover...
Sending discover...
Sending discover...
Usage: /sbin/cirros-dhcpc <up|down>
No lease, failing
...
### ifconfig -a
eth0      Link encap:Ethernet  HWaddr FA:16:3E:BA:9C:84  
          inet6 addr: fe80::f816:3eff:feba:9c84/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:53 errors:0 dropped:45 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5823 (5.6 KiB)  TX bytes:1132 (1.1 KiB)

Any more ideas how to troubleshoot this?

2015-06-01 15:17:34 -0500 asked a question Unable to delete port

This is similar to this thread https://ask.openstack.org/en/question/60423/unable-to-delete-neutron-port/ (https://ask.openstack.org/en/question...) but in this case, there isn't any floatingip associated to that port and still cannot be deleted. The port is type network:router_gateway but there is not router existing anymore (neutron router-list returns nothing).

$ neutron port-list
+--------------------------------------+-------+-------------------+--------------------------------------------------------------------------------------+
| id                                   | name  | mac_address       | fixed_ips                                                                            |
+--------------------------------------+-------+-------------------+--------------------------------------------------------------------------------------+
| 0d4cc006-7e22-465f-bab3-fc1cacc98d5d | test2 | fa:16:3e:70:6c:9e | {"subnet_id": "2eb91f84-a5c3-441b-b96e-0e275a17e24c", "ip_address": "172.30.10.156"} |
+--------------------------------------+-------+-------------------+--------------------------------------------------------------------------------------+

$ neutron port-delete 0d4cc006-7e22-465f-bab3-fc1cacc98d5d
Port 0d4cc006-7e22-465f-bab3-fc1cacc98d5d has owner network:router_gateway and therefore cannot be deleted directly via the port API.

$ neutron port-show 0d4cc006-7e22-465f-bab3-fc1cacc98d5d
+-----------------------+--------------------------------------------------------------------------------------+
| Field                 | Value                                                                                |
+-----------------------+--------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                 |
| allowed_address_pairs |                                                                                      |
| binding:host_id       |                                                                                      |
| binding:profile       | {}                                                                                   |
| binding:vif_details   | {}                                                                                   |
| binding:vif_type      | unbound                                                                              |
| binding:vnic_type     | normal                                                                               |
| device_id             | 258a02d4-75d4-44b9-bcee-53bf2f797b44                                                 |
| device_owner          | network:router_gateway                                                               |
| extra_dhcp_opts       |                                                                                      |
| fixed_ips             | {"subnet_id": "2eb91f84-a5c3-441b-b96e-0e275a17e24c", "ip_address": "172.30.10.156"} |
| id                    | 0d4cc006-7e22-465f-bab3-fc1cacc98d5d                                                 |
| mac_address           | fa:16:3e:70:6c:9e                                                                    |
| name                  | test2                                                                                |
| network_id            | e513c2ab-d49b-4f96-90b6-ad862e518cd7                                                 |
| security_groups       |                                                                                      |
| status                | DOWN                                                                                 |
| tenant_id             |                                                                                      |
+-----------------------+--------------------------------------------------------------------------------------+

$neutron router-list

$ neutron floatingip-list

$ neutron net-list
+--------------------------------------+------------------+-----------------------------------------------------+
| id                                   | name             | subnets                                             |
+--------------------------------------+------------------+-----------------------------------------------------+
| e513c2ab-d49b-4f96-90b6-ad862e518cd7 | provider_network | 2eb91f84-a5c3-441b-b96e-0e275a17e24c 172.30.10.0/24 |
+--------------------------------------+------------------+-----------------------------------------------------+

 $ neutron subnet-list
+--------------------------------------+-----------------+----------------+----------------------------------------------------+
| id                                   | name            | cidr           | allocation_pools                                   |
+--------------------------------------+-----------------+----------------+----------------------------------------------------+
| 2eb91f84-a5c3-441b-b96e-0e275a17e24c | provider_subnet | 172.30.10.0/24 | {"start": "172.30.10.150", "end": "172.30.10.200"} |
+--------------------------------------+-----------------+----------------+----------------------------------------------------+