Bug 2163914 - [RFE] Provide means to export configured cluster properties as pcs commands [NEEDINFO]
Summary: [RFE] Provide means to export configured cluster properties as pcs commands
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: pcs
Version: 9.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 9.3
Assignee: Miroslav Lisik
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks: 2166289
TreeView+ depends on / blocked
 
Reported: 2023-01-24 14:04 UTC by Tomas Jelinek
Modified: 2023-08-16 17:17 UTC (History)
9 users (show)

Fixed In Version: pcs-0.11.5-1.el9
Doc Type: Enhancement
Doc Text:
Feature: Pcs command `pcs property` is now able to export cluster properties configuration in form of text, json and pcs command(s) by using option '--output-format'. During the overhaul of `pcs property` command the option '--defaults' was deprecated in favor of newly added command `pcs property defaults`. Another new command `pcs property describe` for describing meaning of cluster properties was added. Text format output of `pcs resource describe` command was extended and unified with `pcs property describe` text output. Reason: Pcs was able only to export configuration of cluster properties in text format. Ability to export configuration of cluster properties in format of pcs command is very useful feature that contributes to more portable form of re-creation of current cluster configuration. In order to add feature, the `pcs property [config]` command needed to be rewritten to the new architecture. Result: Pcs command `pcs property` now support '--output-format' option. There are 3 formats of output available: 'cmd', 'json', 'text', default is 'text'. The 'text' format slightly differs from previous `pcs property` command plaintext only format. Another two commands were added: `pcs property defaults` and `pcs property describe`. Text output format of `pcs resource describe` command was extended.
Clone Of:
: 2166289 (view as bug list)
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:
slevine: needinfo? (mlisik)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-6630 0 None None None 2023-04-19 22:23:28 UTC
Red Hat Issue Tracker RHELPLAN-146183 0 None None None 2023-01-24 14:09:18 UTC

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


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