diff --git a/scripts/setup.sh b/scripts/setup.sh index b436af8e0..cf18e2998 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -142,7 +142,8 @@ spinifex-daemon ALL=(root) NOPASSWD: /sbin/ip, /usr/sbin/ip spinifex-daemon ALL=(root) NOPASSWD: /usr/bin/ovs-vsctl, /usr/bin/ovs-appctl spinifex-daemon ALL=(root) NOPASSWD: /usr/sbin/dhcpcd -# Spinifex VPC daemon: OVN and OVS read/write, OVN controller status check +# Spinifex VPC daemon: OVN and OVS read/write, OVN controller status check and DHCP +spinifex-vpcd ALL=(root) NOPASSWD: /usr/sbin/dhcpcd spinifex-vpcd ALL=(root) NOPASSWD: /usr/bin/ovs-vsctl, /usr/bin/ovs-appctl spinifex-vpcd ALL=(root) NOPASSWD: /usr/bin/ovn-nbctl, /usr/bin/ovn-sbctl spinifex-vpcd ALL=(root) NOPASSWD: /usr/bin/systemctl is-active --quiet ovn-controller diff --git a/spinifex/services/vpcd/vpcd.go b/spinifex/services/vpcd/vpcd.go index cb562f456..535f79b91 100644 --- a/spinifex/services/vpcd/vpcd.go +++ b/spinifex/services/vpcd/vpcd.go @@ -146,7 +146,7 @@ func (svc *Service) Reload() error { var checkBrInt = func() error { cmd := sudoCommand("ovs-vsctl", "br-exists", "br-int") if err := cmd.Run(); err != nil { - return fmt.Errorf("br-int does not exist: run ./scripts/setup-ovn.sh --management") + return fmt.Errorf("br-int does not exist (%w): run ./scripts/setup-ovn.sh --management", err) } return nil }