kolla-ansible/docker/iscsid/extend_start.sh
Vladislav Belogrudov 19a40963f7 iscsi initiator names must be unique among hosts
Initiator names are generated during image build and therefore are
not unique in multi-host environment. Instead the names should be
autogenerated during first start of iscsid containers.

Change-Id: Ia439b1563c9c9d6c26d8a314fe2817ba493dacb5
Closes-Bug: 1611775
2016-08-10 17:09:50 +03:00

8 lines
245 B
Bash

#!/bin/bash
# check if unique iSCSI initiator name already exists
if [[ ! -f /etc/iscsi/initiatorname.iscsi ]]; then
echo "Generating new iSCSI initiator name"
echo InitiatorName=$(/sbin/iscsi-iname) > /etc/iscsi/initiatorname.iscsi
fi