Merge "iscsi initiator names must be unique among hosts"

This commit is contained in:
Jenkins 2016-08-13 03:04:43 +00:00 committed by Gerrit Code Review
commit 349f46950b
2 changed files with 11 additions and 0 deletions

View File

@ -21,6 +21,10 @@ MAINTAINER {{ maintainer }}
RUN {{ macros.install_packages(iscsid_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start \
&& rm /etc/iscsi/initiatorname.iscsi
{% block iscsid_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

@ -0,0 +1,7 @@
#!/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