diff --git a/iscsi/initiator/install.sls b/iscsi/initiator/install.sls index 4d34f527..2567877a 100644 --- a/iscsi/initiator/install.sls +++ b/iscsi/initiator/install.sls @@ -130,3 +130,14 @@ iscsi_initiator_service: {%- if data.man5.kmodule %} - unless: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }} {%- endif %} + +iscsi_initiator_service_running_failure_explanation: + test.show_notification: + - text: | + In certain circumstances the iscsi initiator service will not start. + One reason is your kernel version was upgraded and reboot is needed. + If that's the case then run command: + 'systemctl enable {{ data.man5.svcname }}' && reboot + - onfail: + - service: iscsi_initiator_service + - unless: {{ grains.os_family in ('MacOS', 'Windows') }} #maybe not needed but no harm diff --git a/iscsi/target/install.sls b/iscsi/target/install.sls index b97ce8f1..2ca27963 100644 --- a/iscsi/target/install.sls +++ b/iscsi/target/install.sls @@ -132,3 +132,14 @@ iscsi_target_service_running: {%- if data.man5.kmodule %} - unless: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }} {%- endif %} + +iscsi_target_service_running_failure_explanation: + test.show_notification: + - text: | + In certain circumstances the iscsi target service will not start. + One reason is your kernel version was upgraded but host not rebooted. + If that's the case then run command: + 'systemctl enable {{ data.man5.svcname }}' && reboot + - onfail: + - service: iscsi_target_service_running + - unless: {{ grains.os_family in ('MacOS', 'Windows') }} #maybe not needed but no harm