Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1547557

Summary: updating vdo package removes symlink to vdo.service
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Krysl <jkrysl>
Component: vdoAssignee: Joseph Chapman <jochapma>
Status: CLOSED DUPLICATE QA Contact: Jakub Krysl <jkrysl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: awalsh, bgurney, jkrysl, jochapma, rhandlin
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-23 15:09:06 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:
Embargoed:
Attachments:
Description Flags
output from 'yum install vdo kmod-kvdo' none

Description Jakub Krysl 2018-02-21 14:27:43 UTC
Description of problem:
When installing newer version of vdo using yum with vdo already installed, the update removes symlink /etc/systemd/system/multi-user.target.wants/vdo.service but does not renew it.

Resolving Dependencies
--> Running transaction check
---> Package vdo.x86_64 0:6.1.0.146-16 will be updated
---> Package vdo.x86_64 0:6.1.0.149-16 will be an update
--> Finished Dependency Resolution

Dependencies Resolved
-- snip --
Running transaction
  Updating   : vdo-6.1.0.149-16.x86_64                                                               1/2
Removed symlink /etc/systemd/system/multi-user.target.wants/vdo.service.
  Cleanup    : vdo-6.1.0.146-16.x86_64                                                               2/2
  Verifying  : vdo-6.1.0.149-16.x86_64                                                               1/2
  Verifying  : vdo-6.1.0.146-16.x86_64                                                               2/2

Updated:
  vdo.x86_64 0:6.1.0.149-16

Complete!

Version-Release number of selected component (if applicable):
Tested with vdo 6.1.0.130 -> 6.1.0.146 and 6.1.0.146 -> 6.1.0.149

How reproducible:
100%

Steps to Reproduce:
1. yum install vdo
2. yum install $newer-version-of-vdo
3. ls /etc/systemd/system/multi-user.target.wants | grep vdo

Actual results:
[empty]

Expected results:
vdo.service

Additional info:

Comment 2 Andy Walsh 2018-02-21 23:28:29 UTC
Created attachment 1399041 [details]
output from 'yum install vdo kmod-kvdo'

This symlink is created as part of the install steps of the RPM.

Attached is the output of a 'yum install vdo kmod-kvdo', where you can see the line 'Created symlink from /etc/systemd/system/multi-user.target.wants/vdo.service to /usr/lib/systemd/system/vdo.service.'

This is most likely coming from the %post section in the RPM:
  %post
  systemctl enable vdo.service ||:

What's unclear is why (since we don't distinguish between install, upgrade, or remove) the %post isn't run on the new RPM.

The %preun section is what is most likely causing the symlink to go away:
  %preun
  systemctl disable vdo.service ||:

Comment 4 Andy Walsh 2018-02-23 15:09:06 UTC
This bug will is fixed as part of the solution for bz 1531111 by adopting the appropriate systemd macros.

*** This bug has been marked as a duplicate of bug 1531111 ***