Bug 1044681 - netcf-libs should use systemd
Summary: netcf-libs should use systemd
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: netcf
Version: 7.0
Hardware: All
OS: All
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-18 19:42 UTC by jcpunk
Modified: 2014-06-18 08:35 UTC (History)
10 users (show)

Fixed In Version: netcf-0.2.3-6.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:56:07 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description jcpunk 2013-12-18 19:42:27 UTC
Description of problem:
netcf-libs has legacy init script

Version-Release number of selected component (if applicable):netcf-libs-0.2.3-4.el7.x86_64.rpm


How reproducible:100%


Steps to Reproduce:
1.install netcf-libs
2.look for systemd service
3.find legacy init script

Actual results:
legacy init script

Expected results:
systemd unit

Additional info:

Comment 2 Laine Stump 2014-01-21 13:25:20 UTC
Once a netcf build with the proper patches is available, the testing scenario would be something like this:


   yum update netcf-*.x86_64.rpm
   # (libvirtd will continue using old netcf until we reload it.
   # this can only be avoided by mandating offline updates)
   systemctl restart libvirtd.service
   virsh iface-begin
   (erase/modify some ifcfg-* files in /etc/sysconfig/network-scripts)
   (reboot the system)
   (see if the original files have been restored to /etc/sysconfig/network-scripts)

(Note that as long as "virsh iface-begin returns success, if the restoration part of the test fails, you can always manually retrieve the original files from /var/lib/netcf/network-snapshot)

Comment 3 Laine Stump 2014-01-22 11:26:57 UTC
A patch to fix this has been pushed upstream:

commit 2ca7857cc5ececf12288f4bcda586befdb16378c
Author: Laine Stump <laine>
Date:   Fri Jan 17 11:58:46 2014 +0200

    support systemd-based netcf-transaction

Comment 4 Laine Stump 2014-01-22 14:44:12 UTC
Note that due to a typo in the above patch, a 2nd patch is required:

commit 9dabd473ce54a5264ae92a78d5e4019b864f6997
Author: Laine Stump <laine>
Date:   Wed Jan 22 15:27:43 2014 +0200

    fix autogen build error
    
    A last minute change to the previous patch addressing a review comment
    managed to break an autogen, but I didn't notice because the error
    scrolled off the screen:
    
    checking for system init flavor... ./configure: line 32046: systemd: command not found

Comment 8 Jincheng Miao 2014-01-24 09:58:48 UTC
Hi Laine,

I can successfully run your steps from comment 2 both netcf-0.2.3-4.el7 and netcf-0.2.3-6.el7.
And I also could see the file /etc/init.d/netcf-transaction and /etc/systemd/system/multi-user.target.wants/netcf-transaction.service in latest netcf-0.2.3-6.el7, so how could I know which script netcf currently used?

In my opinion, the newer netcf should remove /etc/init.d/netcf-transaction if netcf decides to switch to systemd.
Could you help me to understand it?

Comment 9 Laine Stump 2014-01-24 11:18:09 UTC
netcf-0.2.3-6.el7 does not provide /etc/init.d/netcf-transaction (this can be verified with "yum provides */netcf-transaction - it returns no results).

During an rpm update, the older version files are removed according to the older version's file list, and newer version files are installed according to the newer version's file list - in other words, it is the older version of the rpm that should be (and is) taking care of removing this file that is no longer used.

I've just downgraded my local netcf to 0.2.3-5 (noting that /usr/libexec/netcf-transaction.sh and /lib/systemd/system/netcf-transaction.service were properly removed, and /etc/init.d/netcf-transaction was properly installed), and then updated back to netcf-0.2.3-6 - /etc/init.d/netcf-transaction *was* properly removed on my system during this update.

How did you do the update? With exactly the simple yum update command I showed in Comment 2? Definitely that command should be uninstalling the files of the previous version. The only way that I can think this file could be around is if it was previously installed by other means (e.g a "make install" from the netcf sources), but I highly doubt you've done that.

(BTW, another way you can verify that the /etc/init.d/netcf-transaction file is from a previous build is by looking at the date - it will have a date within a few minutes of the build date)

Comment 10 Jincheng Miao 2014-01-26 02:35:45 UTC
(In reply to Laine Stump from comment #9)
> (BTW, another way you can verify that the /etc/init.d/netcf-transaction file
> is from a previous build is by looking at the date - it will have a date
> within a few minutes of the build date)

Yes, I recheck it, the updating to latest netcf-0.2.3-6 will remove the previous /etc/init.d/netcf-transaction, and add /usr/lib/systemd/system/netcf-transaction.service. Downgrade to netcf-0.2.3-6 is verse. 
This means netcf-0.2.3-6 already move to systemd.
And the steps from comment 2, netcf-0.2.3-6 can get success, so the netcf-transaction function is working based on systemd. Therefore I choose to change the status to VERIFIED.

Comment 11 Ludek Smid 2014-06-13 09:56:07 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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