Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
- `pcs constraint config` (and its variants for each constraint type) now list
resources in sets in the order defined in the CIB, instead of sorting them
alphabetically ([rhbz#2461143]) ([RHEL-176475])
- Location constraints with rules can be removed using web UI (broken since
pcs-0.12.0b1) ([RHEL-183182])

### Deprecated
- Commands `pcs pcsd certkey` and `pcs pcsd sync-certificates` ([RHEL-149608])
Expand All @@ -37,6 +39,7 @@
[RHEL-149608]: https://issues.redhat.com/browse/RHEL-149608
[RHEL-169571]: https://redhat.atlassian.net/browse/RHEL-169571
[RHEL-176475]: https://redhat.atlassian.net/browse/RHEL-176475
[RHEL-183182]: https://redhat.atlassian.net/browse/RHEL-183182
[rhbz#2458608]: https://bugzilla.redhat.com/show_bug.cgi?id=2458608
[rhbz#2461143]: https://bugzilla.redhat.com/show_bug.cgi?id=2461143

Expand Down
2 changes: 2 additions & 0 deletions pcs/cli/constraint/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def remove(lib: Any, argv: Argv, modifiers: InputModifiers) -> None:
raise CmdLineInputError()
ensure_unique_args(argv)
constraints_dto = lib.constraint.get_config(evaluate_rules=False)
# /remote/remove_constraint_rule_remote url depends on the fact that rules
# in location constraints are allowed here as well
missing_ids = set(argv) - (
get_all_constraints_ids(constraints_dto)
| get_all_location_rules_ids(constraints_dto)
Expand Down
4 changes: 3 additions & 1 deletion pcsd/pcs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@ def remove_constraint(auth_user, constraint_id)
end

def remove_constraint_rule(auth_user, rule_id)
# CLI command for removing rules no longer exists in pcs-0.12. Command for
# removing constraints is capable of handling that, though.
stdout, stderror, retval = run_cmd(
auth_user, PCS, "--", "constraint", "rule", "remove", rule_id
auth_user, PCS, "--", "constraint", "remove", rule_id
)
$logger.info stdout
return retval
Expand Down
Loading