tripleo-image-elements/elements/nova-baremetal
Victor Lowther b1197b3819 Have all os-refresh-config elements use su instead of sudo
Using sudo -u to change users for a command can fail if sudo thinks it needs
a controlling TTY as part of its authentication.  Since this is the default config,
that means that whenever the command is run in an environment that does not have
a TTY (such as from init(1)), sudo will die.

su does not care or check for a controlling TTY, so it will succeed as long as
it is being run by root (which should be the case for all os-refresh-config elements).

Therefore, instead of using sudo -u <username> -- <command> to run commands as other
users, use su -s /bin/bash -c "<command>" <username>

This will allow things to function in the face of a misconfigured sudo as well as
allow commands to run against an account that has been locked out or has a shell
that otherwise restricts what commands can be run.

Change-Id: I5cc518ce42536a09e9f25c6635e191884aaaef92
2015-05-19 16:47:18 -04:00
..
install.d Fix DISTRO_NAME usage for centos7 element 2014-10-01 21:47:45 -04:00
os-apply-config/mnt/state/var/lib/nova Inject rather than read-out the virt power key. 2014-02-14 09:46:51 +13:00
os-refresh-config Have all os-refresh-config elements use su instead of sudo 2015-05-19 16:47:18 -04:00
README.md Split out nova-bm-dnsmasq. 2013-09-18 18:18:58 +12:00
element-deps Run migrations from only the bootstrap host 2014-07-18 12:27:36 -07:00

README.md

Nova baremetal services

Configures the nova-baremetal directories on disk and restarts the deploy helper service in os-refresh-config.

An iptables rule to capture incoming EC2 metadata API requests and redirect them to the nova API is automatically added to the neutron.ovs.physical_bridge interface. See the neutron-openvswitch-agent for the full set of ovs parameters. For example:

neutron:
  ovs:
    physical_bridge: br-ctlplane

In the future we may create a dedicated parameter to permit nova-baremetal to run separately from the neutron agents in the undercloud.