18785: make sure that dnsmasq is present, and make sure that our
authorWard Vandewege <ward@curii.com>
Tue, 1 Mar 2022 14:27:50 +0000 (09:27 -0500)
committerWard Vandewege <ward@curii.com>
Wed, 2 Mar 2022 01:11:28 +0000 (20:11 -0500)
       customized /etc/hosts survives a reboot.

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>

tools/salt-install/config_examples/single_host/multiple_hostnames/states/dns.sls [new file with mode: 0644]
tools/salt-install/config_examples/single_host/single_hostname/states/dns.sls [new file with mode: 0644]
tools/salt-install/provision.sh

diff --git a/tools/salt-install/config_examples/single_host/multiple_hostnames/states/dns.sls b/tools/salt-install/config_examples/single_host/multiple_hostnames/states/dns.sls
new file mode 100644 (file)
index 0000000..f298e8f
--- /dev/null
@@ -0,0 +1,8 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+dns:
+  pkg.installed:
+    - pkgs:
+      - dnsmasq
diff --git a/tools/salt-install/config_examples/single_host/single_hostname/states/dns.sls b/tools/salt-install/config_examples/single_host/single_hostname/states/dns.sls
new file mode 100644 (file)
index 0000000..f298e8f
--- /dev/null
@@ -0,0 +1,8 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+dns:
+  pkg.installed:
+    - pkgs:
+      - dnsmasq
index fd88d97a9484e1712d824a91211623ee38198a66..204044d9072e6f86f5b70dd1d4cbe4cd88cbf295 100755 (executable)
@@ -775,6 +775,10 @@ echo '\pset pager off' >> /root/.psqlrc
 # Now run the install
 salt-call --local state.apply -l ${LOG_LEVEL}
 
+# Finally, make sure that /etc/hosts is not overwritten on reboot
+# TODO: will this work on CentOS?
+sed -i 's/^manage_etc_hosts: true/#manage_etc_hosts: true/g' /etc/cloud/cloud.cfg.d/*
+
 # FIXME! #16992 Temporary fix for psql call in arvados-api-server
 if [ "x${DELETE_PSQL}" = "xyes" ]; then
   echo "Removing .psql file"