Ask Your Question

Markus Zoeller's profile - activity

2018-10-18 04:07:37 -0500 received badge  Nice Answer (source)
2017-06-20 01:40:11 -0500 commented question openstack ocata:Filter RetryFilter returned 0 hosts

Do a grep nova.filter nova-scheduler.log. If you see something like RetryFilter starts with 0 hosts, you might have an issue with the resource tracker on the compute nodes. Do a grep "Unable to update inventory for resource provider" nova-compute.log to check this.

2017-03-08 07:47:23 -0500 commented answer dashboard vnc console doesn't work on devstack

The removal got reverted with https://git.openstack.org/cgit/openst...

2016-09-15 02:27:31 -0500 answered a question Nova issue - InternalError: (1049, u"Unknown database 'nova_api'")

Please see https://bugs.launchpad.net/devstack/+... Looks like a valid bug report and I'd suggest to further discuss this there.

2016-08-12 03:45:31 -0500 answered a question Need helps on the serialproxy

The list below doesn't solve your issue but gives you hints for how you can proceed:

  1. The serial console only works with libvirt + qemu|kvm so far [1]
  2. The service nova-serialproxy is running on the controller node
  3. The default values of the nova.conf should be enough on the controller node, you don't need to change serialproxy_hostor serialproxy_port or listen.
  4. You can try to connect to your instance after you logged into your compute node via telnet localhost $port. You'll find the $port in the domain XML of your instance: virsh dumpxml $guest_id | grep -A 8 tcp | grep source [2]
  5. The serial console can only support one single connection at a time (at one port) and blocks every other connection attempt. For example, if you are logged into the serial console via telnet, you won't be able to open a connection via Horizon (and vice versa).
  6. Your guest shouldn't have changed the default kernel boot args for consoles console=tty0 console=ttyS0 [3]
  7. It's always worthwhile to have the log output at DEBUG level. You can change that in nova.conf by setting debug=True [4]. The nova-serialproxy uses this to show its internals [5].
  8. You might want to use Lars's novaconsole as a client [6], which is far more convenient.

At last but not least, whenever you're discussing an issue with someone, it's always a good idea to say which exact version of OpenStack you're using in your deployment. A stable release from upstream, the current development stream (at commit xxx), a product from a distributor (red hat, canonical, ...), and so on.


References:

[1] https://github.com/openstack/nova/blo...

[2] https://github.com/openstack/nova/blo...

[3] https://github.com/openstack/nova/blo...

[4] http://docs.openstack.org/developer/o...

[5] https://github.com/openstack/nova/blo...

[6] https://github.com/larsks/novaconsole

2016-08-12 02:44:24 -0500 commented question How to make Serial Proxy working

This is a duplicate to https://ask.openstack.org/en/question.... You might want to close this one here.

2016-07-01 04:46:07 -0500 commented answer [error]: you must provide a username via either --os-username or env[OS_USERNAME]

You can also download the correct file by using Horizon: Menu item "Project" -> Menu item "Access & Security" -> Tab "API Access" -> Button "Download OpenStack RC File v2.0"

2016-07-01 04:38:30 -0500 commented answer Please help how to solve, i ran ./stack multiples times now gettining error

The rejoin-stack.sh script doesn't exist anymore. You can use screen -x.

2016-07-01 04:35:20 -0500 answered a question [Tox] pep8: commands failed with InvocationError

There's a chance you ran into https://bugs.launchpad.net/devstack/+...

An upgrade to tempest-lib==0.13.0 should solve it:

$ source .tox/pep8/bin/activate
(pep8) $ pip install -U tempest-lib==0.13.0
(pep8) $ deactivate
$ tox -e pep8
2016-06-29 03:32:57 -0500 answered a question tox -e genconfig "ERROR: genconfig...

You can give this a try:

rm -rf .tox # remove everything tox ever did here
sudo pip install --upgrade pip tox virtualenv  # upgrade your tooling (maybe use 'sudo -H ')
tox -e genconfig  # try to build the conf file again
2016-03-21 04:17:57 -0500 answered a question No vnc-console "Origin header does not match this host."

I think you hit an issue which is described in the Nova bug report [1]. This issue got solved with commit [2] and is available since the Nova Liberty release. The implemented solution for it was to introduce a Nova config option "console_allowed_origins" for the DEFAULT section in the "/etc/nova/nova.conf" file. This doesn't solve your issue in your Juno installation but will come in handy when you upgrade later and don't want to rely on private fixes.

References:

2015-07-06 02:59:38 -0500 received badge  Organizer (source)
2015-04-14 07:20:08 -0500 answered a question use nova context to get image details

The nova client will do the authentication with keystone for you. Try this example:

from novaclient.client import Client

NOVA_API_VERSION = 2
NOVA_API_URI = "http://%s:5000/v2.0/"
IMAGE_NAME = "cirros-0.3.3-x86_64-disk.img"  # change accordingly
CONTROLLER_IP = "192.168.122.2"             # change accordingly

def get_nova_client(ip, tenant="demo", user="admin", password="openstack"):
    uri = NOVA_API_URI % ip
    nova = Client(NOVA_API_VERSION, user, password, tenant, uri)
    return nova

nova = get_nova_client(CONTROLLER_IP)

image = nova.images.find(name=TESTIMAGE_NAME)
print("found image: %s" % image)

More information can be found here: http://docs.openstack.org/developer/p...

2015-02-16 07:38:32 -0500 received badge  Nice Answer (source)
2015-01-23 09:43:48 -0500 commented answer dashboard vnc console doesn't work on devstack

For historical reason, this is the commit: https://git.openstack.org/cgit/openst...

2015-01-05 10:43:42 -0500 marked best answer How to connect to a serial port of an instance via websocket?

My question is similar to https://ask.openstack.org/en/question/50235/accessing-serial-port-of-running-instance/ (this).

The blueprint https://blueprints.launchpad.net/nova/+spec/serial-ports (serial-ports) is implemented. The nova-client can query the serial ports connection info of an instance with:

nova get-serial-console myInstance

It returns a string like:

ws://127.0.0.1:6083/?token=e2b42240-375d-41fe-a166-367e4bbdce35

How do I consume (connect to) such a serial port?

I tried to create a client like the following code[1] and got an error (undefined):

<!DOCTYPE html>
<meta charset="utf-8" />
<title>WebSocket Test</title>
<script language="javascript" type="text/javascript">

  // var wsUri = "ws://echo.websocket.org/";
  var wsUri = "ws://127.0.0.1:6083/?token=e2b42240-375d-41fe-a166-367e4bbdce35"
  var output;

  function init()
  {
    output = document.getElementById("output");
    testWebSocket();
  }

  function testWebSocket()
  {
    websocket = new WebSocket(wsUri);
    websocket.onopen = function(evt) { onOpen(evt) };
    websocket.onclose = function(evt) { onClose(evt) };
    websocket.onmessage = function(evt) { onMessage(evt) };
    websocket.onerror = function(evt) { onError(evt) };
  }

  function onOpen(evt)
  {
    writeToScreen("CONNECTED");
    doSend("WebSocket rocks");
  }

  function onClose(evt)
  {
    writeToScreen("DISCONNECTED");
  }

  function onMessage(evt)
  {
    writeToScreen('<span style="color: blue;">RESPONSE: ' + evt.data+'</span>');
    websocket.close();
  }

  function onError(evt)
  {
    writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data);
  }

  function doSend(message)
  {
    writeToScreen("SENT: " + message); 
    websocket.send(message);
  }

  function writeToScreen(message)
  {
    var pre = document.createElement("p");
    pre.style.wordWrap = "break-word";
    pre.innerHTML = message;
    output.appendChild(pre);
  }

  window.addEventListener("load", init, false);

</script>
<h2>WebSocket Test</h2>

<div id="output"></div>

Sources:

  • [1] http://www.websocket.org/echo.html
2015-01-05 10:43:42 -0500 commented answer How to connect to a serial port of an instance via websocket?

Followup:

2014-12-12 05:23:26 -0500 received badge  Commentator
2014-12-10 10:44:28 -0500 commented answer How can I change my username in review.openstack.com

If you use Launchpad to login to the reviews in OpenStack you could change your name there:

https://launchpad.net/~

I thinks that's the place where review.openstack gets the username.

2014-12-10 03:36:58 -0500 answered a question Is there any way anlyzing nova log files to make sure Juno doesn't force file injection when launching VM ?

The nova.virt.disk.api module has a method inject_data which is used for injecting the files. This method logs on debug level "Inject data ...". I would assume if this message is not available in your logs, the injection of files was not forced.

2014-12-10 03:30:48 -0500 answered a question How do I disable the file injection and force metadata service method?

To disable config drive in Juno I had to use force_config_drive= (yes, without any value) in nova.conf. Maybe this works on inject_partition too.

2014-12-10 03:06:23 -0500 answered a question FlavorDiskTooSmall : is there a way to define a minimal flavor on in the image in glance

You could use the instance_type_* properties for the image:

  • instance_type_ephemeral_gb
  • instance_type_flavorid
  • instance_type_id
  • instance_type_memory_mb
  • instance_type_name
  • instance_type_root_gb
  • instance_type_rxtx_factor
  • instance_type_swap
  • instance_type_vcpu_weight
  • instance_type_vcpus

According to the title of your question I assume you are most likely interested in instance_type_root_gb.

CLI: glance image-update <uuid> --property instance_type_root_gb=<size>

Hint: In documentation and code one will often find instance_type as a synonym to flavor.

Source:http://docs.openstack.org/image-guide...

The second question about providing a default username for ssh login cannot be answered by me, sorry.

2014-12-10 02:35:01 -0500 commented question Error Launching Nova - Compute nova log shows null credentials

The neutron.conf doesn't have an entry in the [database] section. The connection variable is commented out. Maybe that could be reason why the neutronclient cannot establish a connection?

2014-12-10 02:17:44 -0500 answered a question How can I change my username in review.openstack.com

When I'm logged in to https://review.openstack.org/ I can click on my name in the upper right corner, then "Settings" -> "Contact Information" and then there is the textbox "Full Name".

Direct link to this: https://review.openstack.org/#/settin...

Is this what you are looking for?

2014-11-27 03:30:43 -0500 commented question Filter not working Aggregate

Could you provide the content of the /opt/stack/logs/screen/screen-n-cpu.log (if you used devstack) or /var/log/nova/nova-compute.log (if you installed OpenStack otherwise) in http://paste.openstack.org/ please?

2014-11-27 03:22:24 -0500 answered a question How do I deploy a custom scheduler in Openstack

If you installed OpenStack (e.g. with RDO or Ubuntu Cloud packages) there should be the directory /usr/lib/python2.7/site-packages/nova in your environment. This should contain the other directories (e.g. scheduler) you already know from the devstack environment.

Afaik you don't have to compile your newly written ip_scheduler.py file. Just copy it as-is into the scheduler folder. Ensure you have changed the /etc/nova/nova.conf accordingly. After a restart of the scheduler service your new scheduler should do its work like in an devstack environment.

2014-11-27 02:34:51 -0500 commented answer Installed DevStack and rebooted now i get that Max retries exceeded with url

Good to hear that you can go on. Please select one of the answers (could be your answer as well) as "correct" for other people who will google their way to this question.

2014-11-26 08:46:19 -0500 received badge  Teacher (source)
2014-11-26 08:02:56 -0500 commented answer error in creating instances "no valid host was found"

You want to use the baremetal service ironic, one could think that this could be a problem in VMs. But if this would be the case, the OpenStack functional tests wouldn't be possible then. In other words, I don't think this is a "devstack in VM" issue.

2014-11-26 07:57:28 -0500 answered a question Is there any log management tool which work closely with openstack logs?

You could give StackTach a try: https://github.com/rackerlabs/stacktach . Afaik It listens to the message bus of an OpenStack installation. Another thing could be nagios . I didn't try any of them yet, but they are listed at http://docs.openstack.org/openstack-o... .

2014-11-26 04:40:10 -0500 answered a question error in creating instances "no valid host was found"

A few observations of your log files:

Observation 1 : Database consistency

It seems that there could be some inconsistence between database records and actual environment:

grep -E 'WARNING\b' screen-n-cpu.log -C 5 -5

shows:

2014-11-23 16:23:53.648 WARNING nova.compute.manager [-] While synchronizing instance power states, found 1 instances in the database and 0 instances on the hypervisor.

Possible approach: A retry of ./unstack.sh and ./stack.sh could solve that. AFAIK the database will be reset during this.

Observation 2 : Scheduler Filtering

It seems that the scheduler starts with 3 hosts. Two of them will be filtered by the "retry filter":

grep -E 'nova.filters\b' screen-n-sch.log -C 5 -5

shows:

2014-11-21 04:22:10.081 DEBUG nova.filters [req-4df8086c-dd0f-4c2b-86ca-47d737629a05 admin admin] Starting with 3 host(s) from (pid=15141) get_filtered_objects /opt/stack/nova/nova/filters.py:70

2014-11-21 04:22:10.088 DEBUG nova.scheduler.filters.retry_filter [req-4df8086c-dd0f-4c2b-86ca-47d737629a05 admin admin] Host [u'ubuntu', u'8f97a0c0-1766-4fd1-aea4-a962a250e59e'] fails.  Previously tried hosts: [[u'ubuntu', u'8f97a0c0-1766-4fd1-aea4-a962a250e59e'], [u'ubuntu', u'339588f0-56bd-49bd-8974-90c7abfde60e']] from (pid=15141) host_passes /opt/stack/nova/nova/scheduler/filters/retry_filter.py:42
2014-11-21 04:22:10.089 DEBUG nova.scheduler.filters.retry_filter [req-4df8086c-dd0f-4c2b-86ca-47d737629a05 admin admin] Host [u'ubuntu', u'339588f0-56bd-49bd-8974-90c7abfde60e'] fails.  Previously tried hosts: [[u'ubuntu', u'8f97a0c0-1766-4fd1-aea4-a962a250e59e'], [u'ubuntu', u'339588f0-56bd-49bd-8974-90c7abfde60e']] from (pid=15141) host_passes /opt/stack/nova/nova/scheduler/filters/retry_filter.py:42

More information about novas filters can be found at [1].

One host passes this filtering process (id 057b5bf9-faa1-4e62-a8e0-9f38071dae3d) and should be a valid target for the placement of the launched instance. But it seems it isn't used, which confuses me.

Possible approach: Add the AllHostsFilter to the configuration parameter scheduler_default_filters in the /etc/nova/nova.conf file. This assumes that the configuration parameter scheduler_use_baremetal_filters is still on its default False. For more information about these parameters see Table 2.51. Description of scheduler configuration options in [2].

Observation 3 : Resources

The hosts seem to have enough resources for the instance, but maybe more memory and CPUs would be a good idea. The host I reference is:

screen-n-sch.2014-11-21-031146.log:2014-11-21 04:22:04.911 DEBUG nova.scheduler.filter_scheduler [req-4df8086c-dd0f-4c2b-86ca-47d737629a05 admin admin] Weighed [WeighedHost [host: (ubuntu, 339588f0-56bd-49bd-8974-90c7abfde60e) ram:1024 disk:10240 io_ops:0 instances:0, weight: 1.0], WeighedHost [host: (ubuntu, 057b5bf9-faa1-4e62-a8e0-9f38071dae3d) ram:1024 disk:10240 io_ops:0 instances:0, weight: 1.0]] from (pid=15141) _schedule /opt/stack/nova/nova/scheduler/filter_scheduler.py:263

Conclusion

All I could provide with my current knowledge are these observations and possible approaches, sorry.

References

2014-11-25 03:48:09 -0500 answered a question Installed DevStack and rebooted now i get that Max retries exceeded with url

The error you encountered could be solved by:

Make sure that the needed services are up and running:

  • Nova: sudo nova-manage service list (or ps -ef | grep nova)

Grep for ERROR in the log files:

  • /var/log/nova/nova-api.log (or in devstack case: /opt/stack/logs/screen/screen-n-api.log

As already stated in other answers, devstack doesn't survive a reboot and depends on a repeated execution of stack.sh.

2014-11-25 03:18:27 -0500 commented question error in creating instances "no valid host was found"

The name of the needed log file is screen-n-sch.log . It is available on your file host but with a terrible download rate. Could you paste it e.g. to http://paste.openstack.org/about/ ? If the content of the file is too long, use grep ERROR screen-n-sch.log -A 100 -B 50.

2014-11-25 02:49:39 -0500 commented question unable to create new image

You could enable the debug logging level in /etc/glance/glance-api.conf. After that it should be possible to grep the glance logs for ERROR or TRACE . When you post the result of this grep one can help debugging. Perhaps you ran into this: https://bugs.launchpad.net/horizon/+b...

2014-10-30 09:12:55 -0500 received badge  Scholar (source)
2014-10-30 09:12:37 -0500 answered a question How to connect to a serial port of an instance via websocket?

A parallel discussion to this topic was done via OpenStacks mailing list [1][2]. I paste the results here, as it solved my problem.

prerequisites

The serialproxy was not started. So nobody was listening to the port 6083. Validate with:

$ netstat -nat | grep :608 

tcp  0  0 0.0.0.0:6080          0.0.0.0:*            LISTEN     
tcp  0  0 0.0.0.0:6081          0.0.0.0:*            LISTEN     
tcp  0  0 192.168.122.41:60858  192.168.122.41:5672  ESTABLISHED
tcp  0  0 192.168.122.41:60859  192.168.122.41:5672  ESTABLISHED
tcp6 0  0 192.168.122.41:5672   192.168.122.41:60858 ESTABLISHED
tcp6 0  0 192.168.122.41:5672   192.168.122.41:60859 ESTABLISHED

After finding [4] all I had to do was to start this proxy manually with:

$ nova-serialproxy

INFO nova.console.websocketproxy [-] WebSocket server settings:
INFO nova.console.websocketproxy [-]  - Listen on 0.0.0.0:6083
INFO nova.console.websocketproxy [-]  - Flash security policy server
INFO nova.console.websocketproxy [-]  - No SSL/TLS support (no cert file)
INFO nova.console.websocketproxy [-]  - proxying from 0.0.0.0:6083 to None:None

After executing this command, the netstat command from above shows a listener for port 6083:

$ netstat -nat | grep :608 

tcp  0  0 0.0.0.0:6080          0.0.0.0:*            LISTEN     
tcp  0  0 0.0.0.0:6081          0.0.0.0:*            LISTEN     
tcp  0  0 0.0.0.0:6083          0.0.0.0:*            LISTEN  
tcp  0  0 192.168.122.41:60858  192.168.122.41:5672  ESTABLISHED
tcp  0  0 192.168.122.41:60859  192.168.122.41:5672  ESTABLISHED
tcp6 0  0 192.168.122.41:5672   192.168.122.41:60858 ESTABLISHED
tcp6 0  0 192.168.122.41:5672   192.168.122.41:60859 ESTABLISHED

By using Sahids websocketclient (see below) and the URI I got from the command nova get-serial-console instance1 the connection gets established and one will see the login screen (e.g. from cirros).

client

This great example of a websocket client which can consume the URI the Nova API provides is written by Sahid Orentino Ferdjaoui [3]:

# demo os serial-console
#
# deps:
#  easy_install ws4py
#
# nova.conf:
#  [serial_console]
#  enabled = true
# 
# nova boot --image cirros --flavor 1 i1
# nova get-serial-console i1
# python client.py ws://127.0.0.1:6083/?token=5ed671c...

import sys
from ws4py.client.threadedclient import WebSocketClient

class LazyClient(WebSocketClient):
    def run(self):
        try:
            while not self.terminated:
                try:
                    b = self.sock.recv(4096)
                    sys.stdout.write(b)
                    sys.stdout.flush()
                except: # socket error expected
                    pass
        finally:
            self.terminate()

if __name__ == '__main__':
    if len(sys.argv) != 2 or not sys.argv[1].startswith("ws"):
        print "Usage %s: Please use websocket url"
        print "Example: ws://127.0.0.1:6083/?token=xxx"
        exit(1)
    try:
        ws = LazyClient(sys.argv[1], protocols=['binary'])
        ws.connect()
        while True:
            # keyboard event...
            c = sys.stdin.read(1)
            if c:
                ws.send(c)
        ws.run_forever()

    except KeyboardInterrupt:
        ws.close()

consuming ...

(more)
2014-10-28 05:01:03 -0500 commented answer Accessing serial port of running instance

I'd like to add that the mentioned blueprint is already merged. I struggle to access the serial console via websocket. If you have some help, please leave a comment at: https://ask.openstack.org/en/question...

2014-10-14 04:18:45 -0500 received badge  Enthusiast
2014-10-13 10:08:39 -0500 received badge  Famous Question (source)
2014-10-13 02:20:39 -0500 received badge  Supporter (source)
2014-10-10 04:18:56 -0500 received badge  Notable Question (source)
2014-10-10 02:50:01 -0500 received badge  Popular Question (source)