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 1408476 - pcs does not currently work with systemd's instantiated services
Summary: pcs does not currently work with systemd's instantiated services
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.3
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Ivan Devat
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1335682 1412244
TreeView+ depends on / blocked
 
Reported: 2016-12-23 16:05 UTC by Michele Baldessari
Modified: 2017-08-01 18:26 UTC (History)
8 users (show)

Fixed In Version: pcs-0.9.156-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: User creates a cluster resource based on a systemd service which supports multiple instances (i.e. there is the "@" character in the resource agent name). Consequence: The resource agent is not recognized by pcs and the command fails. User has to specify --force in the command for it to succeed. Fix: Fixed validation of systemd resource agent names. Result: It is possible to create cluster resource based on a systemd service which supports multiple instances.
Clone Of:
: 1412244 (view as bug list)
Environment:
Last Closed: 2017-08-01 18:26:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Locally tested fix (652 bytes, patch)
2016-12-23 16:05 UTC, Michele Baldessari
no flags Details | Diff
proposed fix (1.08 KB, patch)
2017-01-11 14:45 UTC, Tomas Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1958 0 normal SHIPPED_LIVE pcs bug fix and enhancement update 2017-08-01 18:09:47 UTC

Description Michele Baldessari 2016-12-23 16:05:48 UTC
Created attachment 1235077 [details]
Locally tested fix

Description of problem:
Currently (pcs-0.9.152-10.el7.centos.x86_64) we do not support systemd instantiated services (0pointer.de/blog/projects/instances.html) aka the services that have an @ in the service filename and that can be instantiated multiple times.

For example:
[root@centos pcs]# pcs resource create gettytest systemd:getty@tty3 
Error: Unable to create resource 'systemd:getty@tty3', it is not installed on this system (use --force to override)

With --force this does get created and it works, but pcs is not considering the instantiated service scenario when it does the prevalidation.

I attach the trivial patch that fixes it for me. I attach it here to the downstream bug only, because this is actually already fixed in pcs master via the following change:
commit 491ac087fd06480a9fda0dfc5dd97f6b9dfbae56
Author: Tomas Jelinek <tojeline>
Date:   Tue Oct 11 17:12:11 2016 +0200

    get resource/fence agents info from pacemaker



With the attached patch applied I can correctly do the following:
[root@centos system]# pcs resource create gettytest4 systemd:getty@tty4

[root@centos system]# pcs status
Cluster name: clustername
Stack: corosync
Current DC: centos (version 1.1.15-11.el7_3.2-e174ec8) - partition with quorum
Last updated: Fri Dec 23 16:40:53 2016		Last change: Fri Dec 23 16:40:49 2016 by root via cibadmin on centos

1 node and 4 resources configured

Online: [ centos ]

Full list of resources:

 gettytest4	(systemd:getty@tty4):	Started centos

Comment 2 Tomas Jelinek 2017-01-11 14:45:23 UTC
Created attachment 1239460 [details]
proposed fix

This will be eventually fixed by a rebase. Until then (and for the z-stream) here is the patch.

Comment 4 Michele Baldessari 2017-01-12 18:26:31 UTC
Giulio, could you provide us some feedback on this just to be 100% sure we covered your use case correctly?

Comment 5 Giulio Fidente 2017-01-13 15:47:50 UTC
hi guys, thanks a lot! I've tested manually the "proposed fix" attachment together with https://review.openstack.org/#/c/407039/ (meant to deploy the ceph rbd-mirror daemon) and it completed successfully:

  [root@overcloud-controller-0 ~]# pcs status|grep -i rbd
   ceph-rbd-mirror_openstack      (systemd:ceph-rbd-mirror@openstack):    Started overcloud-controller-0

looking forward to use it in OSPd11 :)

Comment 6 Ivan Devat 2017-02-20 07:32:06 UTC
After Fix:                                                                      
[vm-rhel72-1 ~] $ rpm -q pcs                                                                                                                                                                                         
pcs-0.9.156-1.el7.x86_64                                                        
[vm-rhel72-1 ~] $ pcs resource create gettytest systemd:getty@tty3              
[vm-rhel72-1 ~] $ pcs status|grep gettytest                                     
 gettytest      (systemd:getty@tty3):   Started vm-rhel72-2

Comment 10 errata-xmlrpc 2017-08-01 18:26:07 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-2017:1958


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