Configure neutron agents in Administrator Guide

Bug #1633184 reported by joe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-manuals
Fix Released
High
monika

Bug Description

-----------------------------------
Release: 0.9 on 2016-10-13 17:06
SHA: 0be2e81941399a1ff2b9b18f9746ae395a4dd0ba
Source: http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/admin-guide/source/networking-config-agents.rst
URL: http://docs.openstack.org/admin-guide/networking-config-agents.html
http://docs.openstack.org/admin-guide/networking-config-agents.html

AT THE BOTTOM OF THE PAGE IS THIS TABLE:

Basic operations on agents¶

This table shows examples of Networking commands that enable you to complete basic operations on agents:

Operation Command
List all available agents.
$ neutron agent-list
Show information of a given agent.
$ neutron agent-show AGENT_ID
Update the admin status and description for a specified agent. The command can be used to enable and disable agents by using --admin-state-up parameter set to False or True.
$ neutron agent-update --admin -state-up False AGENT_ID
Delete a given agent. Consider disabling the agent before deletion.
$ neutron agent-delete AGENT_ID

SPECIFICALLY THE COMMAND "$ neutron agent-update --admin -state-up False AGENT_ID", IT DOESN'T WORK.

BUT "neutron agent-update --admin-state-up AGENT_ID false" DOES.

Tags: admin-guide
monika (monikaparkar25)
Changed in openstack-manuals:
assignee: nobody → monika (monikaparkar25)
Revision history for this message
Joseph Robinson (joseph-r-email) wrote :

The format does need to be "--admin-state-up" to set admin state up of the agent to "false". This seems to be a command typo. Good catch.

Changed in openstack-manuals:
status: New → Confirmed
importance: Undecided → High
milestone: none → ocata
monika (monikaparkar25)
Changed in openstack-manuals:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-manuals (master)

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

Revision history for this message
joe (joseph-wagner) wrote :

Hi Joe,

I'm working with Icehouse upgrading to Kilo currently and it looks like the true/false needs to go at the end.

neutron agent-update --admin-state-up false c9a26668-95c5-4bc5-8393-2ba721383148
Unable to find agent with id 'false'
neutron agent-update --admin-state-up true c9a26668-95c5-4bc5-8393-2ba721383148
Unable to find agent with id 'true'
neutron agent-update --admin-state-up c9a26668-95c5-4bc5-8393-2ba721383148 false
Updated agent: c9a26668-95c5-4bc5-8393-2ba721383148
neutron agent-update --admin-state-up c9a26668-95c5-4bc5-8393-2ba721383148 true
Updated agent: c9a26668-95c5-4bc5-8393-2ba721383148

-Joe

Revision history for this message
monika (monikaparkar25) wrote :

Hi Joe,

As I executed the neutron agent-update command, true/false is not required.

command: neutron agent-update / neutron agent-update --admin-state-up is used to set admin state up of the agent:

neutron agent-update c9a26668-95c5-4bc5-8393-2ba721383148
Updated agent: c9a26668-95c5-4bc5-8393-2ba721383148

neutron agent-update --admin-state-up c9a26668-95c5-4bc5-8393-2ba721383148
Updated agent: c9a26668-95c5-4bc5-8393-2ba721383148

And command: neutron agent-update --admin-state-down is used to set admin state down of the agent:

neutron agent-update --admin-state-down c9a26668-95c5-4bc5-8393-2ba721383148
Updated agent: c9a26668-95c5-4bc5-8393-2ba721383148

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-manuals (master)

Reviewed: https://review.openstack.org/386645
Committed: https://git.openstack.org/cgit/openstack/openstack-manuals/commit/?id=c29c737e153ba747e1e78a17091155dabf8b9e35
Submitter: Jenkins
Branch: master

commit c29c737e153ba747e1e78a17091155dabf8b9e35
Author: hmonika <email address hidden>
Date: Fri Oct 14 08:49:51 2016 +0800

    [admin] Moved the --admin-state-up to the next line

    Change-Id: I74a5541541d0939ac11a69d94e1a4aee1160ed02
    Related-Bug: #1633184

Changed in openstack-manuals:
status: In Progress → Fix Released
Revision history for this message
joe (joseph-wagner) wrote :

Are you sure?
This is from my personal neutron controller nodes:

neutron agent-update --admin-state-down 162c0a2c-7e67-4ac9-9cdb-03af426155e8
Unrecognized attribute(s) 'admin_state_down'

This is from the documentation that I submitted the bug for, please notice the FALSE in the command:

Update the admin status and description for a specified agent. The command can be used to enable and disable agents by using --admin-state-up parameter set to False or True.
$ neutron agent-update --admin -state-up False AGENT_ID

Revision history for this message
Steven Deaton (sdeaton2) wrote :

The problem here is a confusion with differences of OpenStack releases. Joe noted he is using Icehouse and going to Kilo, and here is the help for Mitaka -

$ neutron help agent-update
usage: neutron agent-update [-h] [--request-format {json}]
                            [--admin-state-down] [--description DESCRIPTION]
                            AGENT

Updates the admin status and description for a specified agent.

positional arguments:
  AGENT ID of agent to update.

optional arguments:
  -h, --help show this help message and exit
  --request-format {json}
                        DEPRECATED! Only JSON request format is supported.
  --admin-state-down Set admin state up of the agent to false.
  --description DESCRIPTION
                        Description for the agent.

Note that '--admin-state-up' is not shown, though it does work. This differs from the output Joe was getting because he is trying with older versions.

Revision history for this message
Steven Deaton (sdeaton2) wrote :

After more testing with Joe, I think I see the problem. He is saying that you have to put the UUID before the True or False for it to work - I am seeing the same thing by way of testing.

Here is how it works..

$ neutron agent-update --admin-state-up bbb6c327-e3bc-4835-995b-0bf3f626f4c6 True
Updated agent: bbb6c327-e3bc-4835-995b-0bf3f626f4c6
$ neutron agent-list | grep bbb6c327-e3bc-4835-995b-0bf3f626f4c6
| bbb6c327-e3bc-4835-995b-0bf3f626f4c6 | Open vSwitch agent | <hostname-redacted> | | :-) | True | neutron-openvswitch-agent |
$ neutron agent-update --admin-state-up False bbb6c327-e3bc-4835-995b-0bf3f626f4c6
Unable to find agent with id 'False'
$ neutron agent-update --admin-state-down False bbb6c327-e3bc-4835-995b-0bf3f626f4c6
Invalid values_specs bbb6c327-e3bc-4835-995b-0bf3f626f4c6
$ neutron agent-update --admin-state-up bbb6c327-e3bc-4835-995b-0bf3f626f4c6 False
Updated agent: bbb6c327-e3bc-4835-995b-0bf3f626f4c6
$ neutron agent-list | grep bbb6c327-e3bc-4835-995b-0bf3f626f4c6
| bbb6c327-e3bc-4835-995b-0bf3f626f4c6 | Open vSwitch agent | <hostname-redacted> | | :-) | False | neutron-openvswitch-agent |
$ neutron agent-update --admin-state-up bbb6c327-e3bc-4835-995b-0bf3f626f4c6
Updated agent: bbb6c327-e3bc-4835-995b-0bf3f626f4c6
$ neutron agent-list | grep bbb6c327-e3bc-4835-995b-0bf3f626f4c6
| bbb6c327-e3bc-4835-995b-0bf3f626f4c6 | Open vSwitch agent | <hostname-redacted> | | :-) | True | neutron-openvswitch-agent |
$

Here is what works:
--admin-state-down - passing True/False at the end, doesn't work.
--admin-state-down - without passing True/False at the end, works.
--admin-state-up - passing True/False at the end, works.
--admin-state-up - without passing True/False at the end, works.

The easiest way to toggle this, is by simply doing this:

$ neutron agent-update --admin-state-down bbb6c327-e3bc-4835-995b-0bf3f626f4c6
Updated agent: bbb6c327-e3bc-4835-995b-0bf3f626f4c6
$ neutron agent-list | grep bbb6c327-e3bc-4835-995b-0bf3f626f4c6
| bbb6c327-e3bc-4835-995b-0bf3f626f4c6 | Open vSwitch agent | wcmsc2-l-rh-cmp-18.localdomain | | :-) | False | neutron-openvswitch-agent |
$ neutron agent-update --admin-state-up bbb6c327-e3bc-4835-995b-0bf3f626f4c6
Updated agent: bbb6c327-e3bc-4835-995b-0bf3f626f4c6
$ neutron agent-list | grep bbb6c327-e3bc-4835-995b-0bf3f626f4c6
| bbb6c327-e3bc-4835-995b-0bf3f626f4c6 | Open vSwitch agent | wcmsc2-l-rh-cmp-18.localdomain | | :-) | True | neutron-openvswitch-agent |
$

...just --admin-state-down and then --admin-state-up depending on what you want to do.

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.