There is no "[vnc]" option group in nova.conf.sample

Bug #1506356 reported by shunya kitada
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
shunya kitada
Liberty
Fix Released
Undecided
Dirk Mueller

Bug Description

I try to generate the sample nova.conf file, run the following.
$ tox -egenconfig

But, there is no "[vnc]" option group nova.conf.sample.

"[vnc]" option group is defined in "vnc/__init__.py",
but "nova.vnc" namespace is not defined in "etc/nova/nova-config-generator.conf".

vnc/__init__.py
```
vnc_opts = [
     cfg.StrOpt('novncproxy_base_url',
                default='http://127.0.0.1:6080/vnc_auto.html',
                help='Location of VNC console proxy, in the form '
                     '"http://127.0.0.1:6080/vnc_auto.html"',
                deprecated_group='DEFAULT',
                deprecated_name='novncproxy_base_url'),
    ...
]

CONF = cfg.CONF
CONF.register_opts(vnc_opts, group='vnc')
```

I resolved this, following 3 steps.
Not sure if this is the correct fix or not.

1. Define "nova.vnc" namespace in "etc/nova/nova-config-generator.conf",
```
   [DEFAULT]
   output_file = etc/nova/nova.conf.sample
   ...
   namespace = nova.virt
 > namespace = nova.vnc
   namespace = nova.openstack.common.memorycache
   ...
```

2. Define "nova.vnc" entry_point in setup.cfg.

```
   [entry_points]
   oslo.config.opts =
       nova = nova.opts:list_opts
       nova.api = nova.api.opts:list_opts
       nova.cells = nova.cells.opts:list_opts
       nova.compute = nova.compute.opts:list_opts
       nova.network = nova.network.opts:list_opts
       nova.network.neutronv2 = nova.network.neutronv2.api:list_opts
       nova.scheduler = nova.scheduler.opts:list_opts
       nova.virt = nova.virt.opts:list_opts
 > nova.vnc = nova.vnc.opts:list_opts
 ...
```

3. Create "nova/vnc/opts.py".

```
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import nova.vnc

def list_opts():
    return [
        ('vnc', nova.vnc.vnc_opts),
    ]
```

shunya kitada (skitada)
Changed in nova:
assignee: nobody → shunya kitada (skitada)
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

I think this got introduced with [1]+[2] in Liberty => CONFIRMED.

For this current release (Mitaka) it could be sufficient to move the "nova.vnc.vnc_opts" in "nova/nova/opts.py" away from the "default" group
to its own "vnc" group (like "rdp" and "spice")[3].

The "nova.conf.sample" in looks like this:

    [DEFAULT]

    [...]

    # Enable VNC related features (boolean value)
    # Deprecated group/name - [DEFAULT]/vnc_enabled
    #enabled = true

which doesn't make any sense because the "[vnc]" section is missing.
The fix should be backported to Liberty too. The manual "configuration
reference guide" will show the wrong content too if this isn't fixed
which means the docs team should be pinged when this fix lands, so that
they can trigger the update of the guide. As the cloud operators will
have a wrong documentation, I consider this as a high prio bug.

References:
[1]"Register the vnc config options under group 'vnc'":
   https://git.openstack.org/cgit/openstack/nova/commit/?id=3b38ae48421b689fbbf96d0a43c98585a6659e4f
[2] "Use oslo-config-generator instead of generate_sample.sh":
    https://git.openstack.org/cgit/openstack/nova/commit/nova?id=6f3448bdbff15c268cc5b5f9f0785523b09c6507
[3] https://git.openstack.org/cgit/openstack/nova/tree/nova/opts.py?id=20fc24114d47fcbaf0687bdc70c3f9edb6b2bed2#n102

tags: added: documentation
Changed in nova:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

@shunya kitada: Thanks for taking over to provide a fix for this. If you need help, ping me (markus_z) in IRC.

tags: added: low-hanging-fruit
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/235396

Revision history for this message
shunya kitada (skitada) wrote :

@Markus Zoeller: Thank you for advice to fix bug. I was able to create a patch.

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

It seems that the "configuration reference" manual is not affected [1], therefore I lower the importance of this bug.

[1] http://docs.openstack.org/liberty/config-reference/content/list-of-compute-config-options.html

Changed in nova:
importance: High → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/255488

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/235396
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=68200d7585c384adb8a688376cc8e5e013395a34
Submitter: Jenkins
Branch: master

commit 68200d7585c384adb8a688376cc8e5e013395a34
Author: Shunya Kitada <email address hidden>
Date: Thu Oct 15 23:33:32 2015 +0900

    Add "vnc" option group for sample nova.conf file

    There is no "[vnc]" section in nova.conf.sample generated by
    command "tox -egenconfig".
    In addition, the "[default]" section has vnc options.

    This patch moves vnc options from "[default]" section to
    "[vnc]" section.

    Change-Id: I5cf69729aa9e2bb868f26b82eaaa28187ce7a7a3
    Closes-Bug: #1506356

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/liberty)

Reviewed: https://review.openstack.org/255488
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6ba4803a0d667fc03d7daf0ab1684b3e81413f17
Submitter: Jenkins
Branch: stable/liberty

commit 6ba4803a0d667fc03d7daf0ab1684b3e81413f17
Author: Shunya Kitada <email address hidden>
Date: Thu Oct 15 23:33:32 2015 +0900

    Add "vnc" option group for sample nova.conf file

    There is no "[vnc]" section in nova.conf.sample generated by
    command "tox -egenconfig".
    In addition, the "[default]" section has vnc options.

    This patch moves vnc options from "[default]" section to
    "[vnc]" section.

    Change-Id: I5cf69729aa9e2bb868f26b82eaaa28187ce7a7a3
    Closes-Bug: #1506356
    (cherry picked from commit 68200d7585c384adb8a688376cc8e5e013395a34)

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/nova 12.0.1

This issue was fixed in the openstack/nova 12.0.1 release.

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/nova 13.0.0.0b2

This issue was fixed in the openstack/nova 13.0.0.0b2 development milestone.

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.