Bug 1384505 - [ceph-iscsi-ansible]: "systemctl target restart" is destructive on a gateway installed through ansible
Summary: [ceph-iscsi-ansible]: "systemctl target restart" is destructive on a gateway ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Storage Console
Classification: Red Hat Storage
Component: ceph-ansible
Version: 2
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
: 2
Assignee: Paul Cuzner
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-13 12:28 UTC by Tejas
Modified: 2016-11-22 23:41 UTC (History)
9 users (show)

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:
Clone Of:
Environment:
Last Closed: 2016-11-22 23:41:18 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2817 0 normal SHIPPED_LIVE ceph-iscsi-ansible and ceph-ansible bug fix update 2017-04-18 19:50:43 UTC

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


Note You need to log in before you can comment on or make changes to this bug.