Make initiatorName unique for ISCSI
Closes-Bug: PROD-22900 (PROD:22900)
Change-Id: I6e0ca2d1745c86b1a199746c49a0abf792cc9070
diff --git a/common/ubuntu_base.sh b/common/ubuntu_base.sh
index 682c5dd..879c2ef 100644
--- a/common/ubuntu_base.sh
+++ b/common/ubuntu_base.sh
@@ -63,7 +63,7 @@
# FIXME: move to cluster model
# Disable services
-disable_services="apt-daily.timer apt-daily-upgrade.timer lxc.service snapd.service snapd.socket"
+disable_services="apt-daily.timer apt-daily-upgrade.timer lxc.service snapd.service snapd.socket open-iscsi.service tgt.service iscsid.service"
for s in ${disable_services}; do
systemctl disable ${s} || true
systemctl stop ${s} || true
diff --git a/ubuntu-16.04/files/etc/iscsi/initiatorname.iscsi b/ubuntu-16.04/files/etc/iscsi/initiatorname.iscsi
new file mode 100644
index 0000000..bc15b98
--- /dev/null
+++ b/ubuntu-16.04/files/etc/iscsi/initiatorname.iscsi
@@ -0,0 +1,6 @@
+## DO NOT EDIT OR REMOVE THIS FILE!
+## If you remove this file, the iSCSI daemon will not start.
+## If you change the InitiatorName, existing access control lists
+## may reject this initiator. The InitiatorName must be unique
+## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
+GenerateName=yes
\ No newline at end of file
diff --git a/ubuntu-16.04/template.json b/ubuntu-16.04/template.json
index b6aff80..144cf99 100644
--- a/ubuntu-16.04/template.json
+++ b/ubuntu-16.04/template.json
@@ -99,13 +99,8 @@
},
{
"type": "file",
- "source": "files/etc/cloud/cloud.cfg.d/99_tcp.cfg",
- "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
- },
- {
- "type": "file",
- "source": "files/etc/cloud/cloud.cfg",
- "destination": "/etc/cloud/cloud.cfg"
+ "source": "files/etc/",
+ "destination": "/etc"
}
],
"post-processors": [