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 2163914

Summary: [RFE] Provide means to export configured cluster properties as pcs commands
Product: Red Hat Enterprise Linux 9 Reporter: Tomas Jelinek <tojeline>
Component: pcsAssignee: Miroslav Lisik <mlisik>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact: Steven J. Levine <slevine>
Priority: medium    
Version: 9.3CC: cluster-maint, idevat, mlisik, mmazoure, mpospisi, nhostako, omular, slevine, tojeline
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 9.3Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.11.5-1.el9 Doc Type: Enhancement
Doc Text:
.Enhancements to the `pcs property` command The `pcs property` command now supports the following enhancements: * The `pcs property config --output-format=` option ** Specify `--output-format=cmd` to display the `pcs property set` command created from the current cluster properties configuration. You can use this command to re-create configured cluster properties on a different system. ** Specify `--output-format=json` to display the configured cluster properties in JSON format. ** Specify `output-format=text` to display the configured cluster properties in plain text format, which is the default value for this option. * The `pcs property defaults` command, which replaces the deprecated `pcs property --defaults` option * The `pcs property describe` command, which describes the meaning of cluster properties
Story Points: ---
Clone Of:
: 2166289 (view as bug list) Environment:
Last Closed: 2023-11-07 08:23:10 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:
Bug Depends On:    
Bug Blocks: 2166289    

Description Tomas Jelinek 2023-01-24 14:04:21 UTC
This is a part of a long term goal to export the whole cluster configuration in form of pcs commands which, when run, recreate the same configuration.

This particular BZ is focused on cluster properties configuration.

Comment 2 Miroslav Lisik 2023-05-17 15:48:55 UTC
Upstream patch: https://github.com/ClusterLabs/pcs/commit/3b1cdc84d2f4d625350d72d04fe37a5abf423220

Updated commands:
* pcs property [config]

Added commands:
* pcs property defaults
* pcs property describe

Enviroment: A running cluster with some configured properties.

Test:

# pcs property config --output-format=cmd
pcs property set --force -- \
  placement-strategy=minimal
# pcs property defaults placement-strategy
placement-strategy=default
# pcs property describe placement-strategy
placement-strategy
  Description: How the cluster should allocate resources to nodes
  Allowed values: 'balanced', 'default', 'minimal', 'utilization'
  Default: default

Comment 4 Michal Pospisil 2023-05-26 09:28:01 UTC
DevTestResults:

[root@r09-03-a ~]# rpm -q pcs
pcs-0.11.5-1.el9.x86_64

[root@r09-03-a ~]# pcs property set migration-limit=10
[root@r09-03-a ~]# pcs property config --output-format=cmd
pcs property set --force -- \
 migration-limit=10 \
 placement-strategy=minimal

Comment 15 errata-xmlrpc 2023-11-07 08:23:10 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 (Low: pcs security, bug fix, and enhancement update), 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/RHSA-2023:6316