Hi @all,
I received a question from my customer which I couln't answer, yet.
Maybe someone here could give me an explanation or a hint on this:
Imagine a simple resource like
-----
primitive pri_svc_apache lsb:apache2 \
operations $id="pri_svc_apache-operations" \
op monitor interval="30" on-fail="restart" timeout="20s"
-----
As the system goes along, this resource might get stopped and started again.
Once the target-role changes the first time, the target-role meta is added:
-----
primitive pri_svc_apache lsb:apache2 \
operations $id="pri_svc_apache-operations" \
op monitor interval="30" on-fail="restart" timeout="20s" \
meta target-role="Started"
-----
Is there a way to automatically remove these kind of attributes if
they're equal to the cluster defaults?
The problem here is that this resource might belong to a simple group:
-----
group grp_apache pri_svc_apache
-----
Normally, "crm resource stop grp_apache" would set the group's target-role
to Stopped and would also stop the child resource. But if the primitive has
a hard-coded target-role, this command results in a warning which requires
user-interaction:
-----
Do you want to override target-role for child resource pri_svc_apache?
-----
This behavior leads to difficulties if the crm commands are used within
scripts that do some magic things and also execute starts and stops of resources.
"crm -F" or "crm --force" don't help here.
Instead of manually cleaning up redundant resource attributes, it would be great
to have a method for ignoring the kind of messages.
On the other hand there may be comprehensible reasons for this,
but I currently can't guess them.
Could someone please point me in the right direction?
Thanks in advance!
Thomas
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
I received a question from my customer which I couln't answer, yet.
Maybe someone here could give me an explanation or a hint on this:
Imagine a simple resource like
-----
primitive pri_svc_apache lsb:apache2 \
operations $id="pri_svc_apache-operations" \
op monitor interval="30" on-fail="restart" timeout="20s"
-----
As the system goes along, this resource might get stopped and started again.
Once the target-role changes the first time, the target-role meta is added:
-----
primitive pri_svc_apache lsb:apache2 \
operations $id="pri_svc_apache-operations" \
op monitor interval="30" on-fail="restart" timeout="20s" \
meta target-role="Started"
-----
Is there a way to automatically remove these kind of attributes if
they're equal to the cluster defaults?
The problem here is that this resource might belong to a simple group:
-----
group grp_apache pri_svc_apache
-----
Normally, "crm resource stop grp_apache" would set the group's target-role
to Stopped and would also stop the child resource. But if the primitive has
a hard-coded target-role, this command results in a warning which requires
user-interaction:
-----
Do you want to override target-role for child resource pri_svc_apache?
-----
This behavior leads to difficulties if the crm commands are used within
scripts that do some magic things and also execute starts and stops of resources.
"crm -F" or "crm --force" don't help here.
Instead of manually cleaning up redundant resource attributes, it would be great
to have a method for ignoring the kind of messages.
On the other hand there may be comprehensible reasons for this,
but I currently can't guess them.
Could someone please point me in the right direction?
Thanks in advance!
Thomas
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems