Bug 1384505

Summary: [ceph-iscsi-ansible]: "systemctl target restart" is destructive on a gateway installed through ansible
Product: Red Hat Storage Console Reporter: Tejas <tchandra>
Component: ceph-ansibleAssignee: Paul Cuzner <pcuzner>
Status: CLOSED ERRATA QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2CC: adeza, aschoen, ceph-eng-bugs, gmeno, hnallurv, kdreyer, nthomas, sankarshan, seb
Target Milestone: ---   
Target Release: 2   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-iscsi-ansible-1.3-1.el7scon ceph-iscsi-config-1.3-1.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-22 23:41:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Comment 4 seb 2016-10-13 15:46:22 UTC
Assigned to Paul because iscsi related

Comment 5 Paul Cuzner 2016-10-13 22:03:32 UTC
Why this happens : 
The target service calls targetctl which attempts to reload LIO from a prior saved file - this file is empty/does not exist

the configuration for the gateways is NOT stored in the local filesystem - it's stored in rados. We don't use the target service at all, in fact the ansible playbook disables it as noted above. Configuration is restored by the rbd-target-gw service.

(also note that targetcli does not support ALUA fully - which is another reason for not using the target service)

Is disabling the service not enough?

Looking at the rpm the service is installed by the python-rtslib rpm which we *DO* need, so we can't remove target.service from the system.

However, I will look into overriding the service to make it a no-op so once the playbook has run this won't be possible.

Comment 6 Paul Cuzner 2016-10-14 01:04:41 UTC
since target.service can not be removed, the playbook has been updated to use systemctl mask. Now the target.service unit is masked from operations to attempts to start/reload/restart/stop fail with a 'unit' is masked message.

This highlights the fact that the unit should be be used, and prevents the configuration from being corrupted.

Comment 7 Paul Cuzner 2016-10-14 22:08:45 UTC
fix applied and version 1.2 of the ceph-iscsi-ansible and ceph-iscsi-config available for QA testing from Brew.

Comment 9 Paul Cuzner 2016-10-21 05:39:45 UTC
Please recheck in latest 1.3 release

Comment 10 Tejas 2016-10-25 03:18:32 UTC
Verified in version:
ceph-iscsi-ansible-1.3-1.el7scon.noarch.rpm

Comment 12 errata-xmlrpc 2016-11-22 23:41:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:2817