2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 01:51:26 +00:00

ovs-ctl: Store hostname as an external-id.

Update ovs-ctl to store the system hostname as an external-id, similar
to the system-id.  This is largely for convenience.  ovn-controller
will make use of it in a future commit.  Someone in the OpenDaylight
community requested the same thing in a discussion earlier this week.

While we're at it, set external-ids:hostname in ovs-sandbox as well.

Suggested-by: Justin Pettit <jpettit@ovn.org>
Suggested-at: http://openvswitch.org/pipermail/dev/2016-March/068225.html
Signed-off-by: Russell Bryant <russell@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
This commit is contained in:
Russell Bryant 2016-03-25 00:31:22 +00:00
parent 0e12c2a45c
commit 9e6ec60ab3
3 changed files with 7 additions and 0 deletions

View File

@ -356,6 +356,7 @@ rungdb $gdb_vswitchd $gdb_vswitchd_ex ovs-vswitchd --detach --no-chdir --pidfile
if $ovn; then
ovs-vsctl set open . external-ids:system-id=56b18105-5706-46ef-80c4-ff20979ab068
ovs-vsctl set open . external-ids:hostname=sandbox
ovs-vsctl set open . external-ids:ovn-remote=unix:"$sandbox"/ovnsb_db.sock
ovs-vsctl set open . external-ids:ovn-encap-type=geneve
ovs-vsctl set open . external-ids:ovn-encap-ip=127.0.0.1

View File

@ -108,6 +108,8 @@ set_system_ids () {
esac
set "$@" external-ids:system-id="\"$SYSTEM_ID\""
set "$@" external-ids:hostname="\"$(hostname)\""
if test X"$SYSTEM_TYPE" != X; then
set "$@" system-type="\"$SYSTEM_TYPE\""
else

View File

@ -72,6 +72,10 @@
host as displayed by <code>xe host-list</code>.
</column>
<column name="external_ids" key="hostname">
The hostname for the host running Open vSwitch.
</column>
<column name="other_config" key="stats-update-interval"
type='{"type": "integer", "minInteger": 5000}'>
<p>