Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to confirm monitor stop. #604

Closed
HideoYamauchi opened this issue Dec 6, 2022 · 4 comments
Closed

[Question] How to confirm monitor stop. #604

HideoYamauchi opened this issue Dec 6, 2022 · 4 comments

Comments

@HideoYamauchi
Copy link
Contributor

Hi All,

In our RHEL8.6 environment, we used the pcs config command to confirm resource monitor stoppages in the following procedure.

[root@rh86-rex02 ~]# pcs resource config ipaddr
 Resource: ipaddr (class=ocf provider=heartbeat type=IPaddr2)
  Attributes: cidr_netmask=24 ip=192.168.28.212 nic=ens192
  Operations: monitor interval=10s on-fail=restart timeout=60s (ipaddr-monitor-interval-10s)
              start interval=0s on-fail=restart timeout=60s (ipaddr-start-interval-0s)
              stop interval=0s on-fail=block timeout=60s (ipaddr-stop-interval-0s)
[root@rh86-rex02 ~]# pcs resource update ipaddr op monitor interval=10s on-fail=restart timeout=60s enabled=false

--We had checked monitor enabled=false in the pcs config command.--
[root@rh86-rex02 ~]# pcs resource config ipaddr
 Resource: ipaddr (class=ocf provider=heartbeat type=IPaddr2)
  Attributes: cidr_netmask=24 ip=192.168.28.212 nic=ens192
  Operations: monitor enabled=false interval=10s on-fail=restart timeout=60s (ipaddr-monitor-interval-10s)
              start interval=0s on-fail=restart timeout=60s (ipaddr-start-interval-0s)
              stop interval=0s on-fail=block timeout=60s (ipaddr-stop-interval-0s)

However, in the same procedure, it seems that the stop of the monitor cannot be confirmed in the environment of RHEL8.7 and RHEL9.1.
Below is the confirmation result on RHEL9.1, but it seems that enabled=false can be confirmed with pcs config only when json is specified for output-format.

[root@rh91-01 ~]# pcs resource config ipaddr
Resource: ipaddr (class=ocf provider=heartbeat type=IPaddr2)
  Attributes: ipaddr-instance_attributes
    cidr_netmask=24
    ip=192.168.100.125
    nic=ens193
  Operations:
    monitor: ipaddr-monitor-interval-10s
      interval=10s
      timeout=60s
      on-fail=restart
    start: ipaddr-start-interval-0s
      interval=0s
      timeout=60s
      on-fail=restart
    stop: ipaddr-stop-interval-0s
      interval=0s
      timeout=60s
      on-fail=fence
[root@rh91-01 ~]# pcs resource update ipaddr op monitor interval=10s on-fail=restart timeout=60s enabled=false

[root@rh91-01 ~]# pcs resource config ipaddr
Resource: ipaddr (class=ocf provider=heartbeat type=IPaddr2)
  Attributes: ipaddr-instance_attributes
    cidr_netmask=24
    ip=192.168.100.125
    nic=ens193
  Operations:
    monitor: ipaddr-monitor-interval-10s
      interval=10s
      timeout=60s
      on-fail=restart
    start: ipaddr-start-interval-0s
      interval=0s
      timeout=60s
      on-fail=restart
    stop: ipaddr-stop-interval-0s
      interval=0s
      timeout=60s
      on-fail=fence


[root@rh91-01 ~]# pcs resource config ipaddr --output-format cmd
pcs resource create --no-default-ops --force -- ipaddr ocf:heartbeat:IPaddr2 \
  cidr_netmask=24 ip=192.168.100.125 nic=ens193 \
  op \
    monitor interval=10s id=ipaddr-monitor-interval-10s timeout=60s on-fail=restart \
    start interval=0s id=ipaddr-start-interval-0s timeout=60s on-fail=restart \
    stop interval=0s id=ipaddr-stop-interval-0s timeout=60s on-fail=fence

[root@rh91-01 ~]# pcs resource config ipaddr --output-format json
{"primitives": [{"id": "ipaddr", "agent_name": {"standard": "ocf", "provider": "heartbeat", "type": "IPaddr2"}, "description": null, "operations": [{"id": "ipaddr-monitor-interval-10s", "name": "monitor", "interval": "10s", "description": null, "start_delay": null, "interval_origin": null, "timeout": "60s", "enabled": false, 
(snip)

[root@rh91-01 ~]# cibadmin -Q | grep enabled | grep monitor
          <op id="ipaddr-monitor-interval-10s" name="monitor" enabled="false" interval="10s" on-fail="restart" timeout="60s"/>

Is this a bug? Or is it a specification change?

Best Regards,
Hideo Yamauchi.

@tomjelinek
Copy link
Member

Hi @HideoYamauchi,

This is indeed a bug. Thank you very much for reporting it. Good catch! Please follow RHBZ#2151164 for updates.

Regards,
Tomas

@HideoYamauchi
Copy link
Contributor Author

Hi Tomas,

This is indeed a bug. Thank you very much for reporting it. Good catch! Please follow RHBZ#2151164 for updates.

All right!

Many thanks,
Hideo Yamauchi.

@ondrejmular
Copy link
Collaborator

Fix merged into main 6cd7734 and backported to pcs-0.10 as f9de2cb

@HideoYamauchi
Copy link
Contributor Author

Hi Ondrej,

Fix merged into main 6cd7734 and backported to pcs-0.10 as f9de2cb

Great!
Thanks for the quick fix.

Best Regards,
Hideo Yamauchi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants