[Bug 1821255] Re: Restart policy "Always" doesn't work under certain circumstances

Brian Murray brian at ubuntu.com
Tue Apr 2 18:41:00 UTC 2019


Hello Cody, or anyone else affected,

Accepted open-iscsi into cosmic-proposed. The package will build now and
be available at https://launchpad.net/ubuntu/+source/open-
iscsi/2.0.874-5ubuntu9.4 in a few hours, and then in the -proposed
repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-cosmic to verification-done-cosmic. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-cosmic. In either case, without details of
your testing we will not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: open-iscsi (Ubuntu Cosmic)
       Status: In Progress => Fix Committed

** Tags added: verification-needed verification-needed-cosmic

** Changed in: open-iscsi (Ubuntu Bionic)
       Status: In Progress => Fix Committed

** Tags added: verification-needed-bionic

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1821255

Title:
  Restart policy "Always" doesn't work under certain circumstances

Status in open-iscsi package in Ubuntu:
  Fix Released
Status in open-iscsi source package in Bionic:
  Fix Committed
Status in open-iscsi source package in Cosmic:
  Fix Committed
Status in open-iscsi source package in Disco:
  Fix Released

Bug description:
  [Impact]
  iscsid restart fails when killed with SIGTERM

  [Description]
  If systemd tries to execute a command that talks to iscsid via iscsid.socket, it can hang if iscsid is not running (or is in the process of being stopped). This can happen due to the current ExecStop= directive, which calls iscsiadm to kill iscsid, and prevents the service from being restarted even when we set Restart=always in the iscsid unit file.

  The solution is to let systemd terminate iscsid by itself. The default action
  when omitting the ExecStop directive is to send SIGTERM to the process group,
  which is equivalent to invoking "iscsiadm -k" (the current ExecStop command).

  [Test Case]
  1) Deploy a Disco VM e.g. with uvt-kvm
      $ uvt-kvm create disco release=disco

  2) Run the deploy-tgt.sh script in the VM to setup an iSCSI target in the
  localhost. The script will install tgt and open-iscsi, configure a 1G
  file-backed iSCSI target, login and restart iscsid.service
      ubuntu at disco:~$ ./deploy-tgt.sh

  3) Kill iscsid with SIGTERM
      ubuntu at disco:~$ sudo pkill iscsid

  4) Try to stop iscsid.service and check whether it hangs
      ubuntu at disco:~$ sudo systemctl stop iscsid

  If we remove the ExecStop= directive, it works as expected:
      ubuntu at disco:~$ sudo systemctl stop iscsid
      ubuntu at disco:~$
  This also causes Restart=always to work as expected.

  [Regression Potential]
  This shouldn't introduce any regressions, since iscsiadm -k just sends SIGTERM to iscsid's process group and that's equivalent to the default systemd ExecStop action. Nonetheless, changes will be tested with autopkgtests and different iscsi scenarios.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/1821255/+subscriptions



More information about the Ubuntu-sponsors mailing list