Bug 1081242
| Summary: | pcs should abort if required parameter is not present while creating a resource | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jaroslav Kortus <jkortus> | ||||
| Component: | pcs | Assignee: | Tomas Jelinek <tojeline> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Miroslav Lisik <mlisik> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 7.0 | CC: | cfeist, cluster-maint, fdinitto, mlisik, rsteiger, tojeline | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | pcs-0.9.129-1.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: |
Cause:
User creates resource without specifying mandatory parameters.
Consequence:
Pcs prints a warning and creates misconfigured resource that cannot be started by the cluster.
Fix:
Do not create resource with missing mandatory parameters unless --force is specified.
Result:
Pcs prints a warning and exits without creating the misconfigured resource.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-03-05 09:19: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: | |||||||
| Attachments: |
|
||||||
|
Description
Jaroslav Kortus
2014-03-26 20:42:49 UTC
Before we fix this, we're going to want to fix the issue of some resources (especially fence agents that require the 'port' parameter even though pcmk_host_map, etc. is specified). As soon as that's fixed this can be fixed as well. Created attachment 939229 [details]
proposed fix
Before Fix: [root@rh70-node1 ~]# rpm -q pcs pcs-0.9.115-32.el7.x86_64 [root@rh70-node1:~]# pcs status resources [root@rh70-node1:~]# pcs resource create fs ocf:heartbeat:Filesystem device=/dev/light_cluster/fslvm-001 fstype=ext4 Warning: missing required option(s): 'directory' for resource type: ocf:heartbeat:Filesystem [root@rh70-node1:~]# echo $? 0 [root@rh70-node1:~]# pcs status resources fs (ocf::heartbeat:Filesystem): Stopped After Fix: [root@rh70-node1:~]# rpm -q pcs pcs-0.9.129-1.el7.x86_64 [root@rh70-node1:~]# pcs status resources [root@rh70-node1:~]# pcs resource create fs ocf:heartbeat:Filesystem device=/dev/light_cluster/fslvm-001 fstype=ext4 Error: missing required option(s): 'directory' for resource type: ocf:heartbeat:Filesystem (use --force to override) [root@rh70-node1:~]# echo $? 1 [root@rh70-node1:~]# pcs status resources [root@rh70-node1:~]# pcs resource create fs ocf:heartbeat:Filesystem device=/dev/light_cluster/fslvm-001 fstype=ext4 --force [root@rh70-node1:~]# echo $? 0 [root@rh70-node1:~]# pcs status resources fs (ocf::heartbeat:Filesystem): Stopped Marking Verified in version pcs-0.9.137-10.el7.x86_64. The pcs aborts when required parameter is not present while creating a resource. [root@virt-017 ~]# pcs resource create bind_fs ocf:heartbeat:Filesystem device=/etc fstype=none options=bind Error: missing required option(s): 'directory' for resource type: ocf:heartbeat:Filesystem (use --force to override) [root@virt-017 ~]# echo $? 1 [root@virt-017 ~]# pcs status resources | grep bind_fs [root@virt-017 ~]# pcs resource create bind_fs ocf:heartbeat:Filesystem device=/etc fstype=none options=bind --force [root@virt-017 ~]# pcs status resources | grep bind_fs bind_fs (ocf::heartbeat:Filesystem): FAILED Correctly failed as expected. 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, 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://rhn.redhat.com/errata/RHBA-2015-0415.html |