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.
[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:
Author: Tomas Jelinek <email@example.com>
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
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
Created attachment 1239460 [details]
This will be eventually fixed by a rebase. Until then (and for the z-stream) here is the patch.
Giulio, could you provide us some feedback on this just to be 100% sure we covered your use case correctly?
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 :)
[vm-rhel72-1 ~] $ rpm -q pcs
[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
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.