Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1483124 Details for
Bug 1628659
LVM-activate: needs to run lvm_validate before a stop action as well
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
UNTESTED diff
LVM-activate.diff (text/plain), 2.68 KB, created by
David Teigland
on 2018-09-13 18:36:51 UTC
(
hide
)
Description:
UNTESTED diff
Filename:
MIME Type:
Creator:
David Teigland
Created:
2018-09-13 18:36:51 UTC
Size:
2.68 KB
patch
obsolete
>--- LVM-activate 2018-09-13 13:17:48.658405896 -0500 >+++ LVM-activate.b 2018-09-13 13:32:53.090968048 -0500 >@@ -56,6 +56,7 @@ > # 3: vg has system_id (new) > # 4: vg has tagging (old) > VG_access_mode=${OCF_RESKEY_vg_access_mode} >+vg_access_num=0 > > # Activate LV(s) with "shared" lock for cluster fs > # or "exclusive" lock for local fs >@@ -176,7 +177,9 @@ > # 2: vg is clustered - clvmd (old) > # 3: vg has system_id (new) > # 4: vg has tagging (old) >-get_VG_access_mode() { >+ >+get_access_mode_num_from_vgs() >+{ > local access_mode > local vg_locktype > local vg_clustered >@@ -415,11 +418,8 @@ > return $OCF_SUCCESS > } > >-lvm_validate() { >- local lv_count >- local mode >- >- # Parameters checking >+read_parameters() >+{ > if [ -z "$VG" ] > then > ocf_exit_reason "You must identify the volume group name!" >@@ -435,22 +435,27 @@ > # Convert VG_access_mode from string to index > case ${VG_access_mode} in > lvmlockd) >- VG_access_mode=1 >+ vg_access_num=1 > ;; > clvmd) >- VG_access_mode=2 >+ vg_access_num=2 > ;; > system_id) >- VG_access_mode=3 >+ vg_access_num=3 > ;; > tagging) >- VG_access_mode=4 >+ vg_access_num=4 > ;; > *) > ocf_exit_reason "You specified an invalid value for vg_access_mode: $VG_access_mode" > exit $OCF_ERR_CONFIGURED > ;; > esac >+} >+ >+lvm_validate() { >+ local lv_count >+ local mode > > check_binary pgrep > # Every LVM command is just symlink to lvm binary >@@ -471,9 +476,9 @@ > # Get the access mode from VG metadata and check if it matches the input > # value. Skip to check "tagging" mode because there's no reliable way to > # automatically check if "tagging" mode is being used. >- get_VG_access_mode >+ get_access_mode_num_from_vgs > mode=$? >- if [ $VG_access_mode -ne 4 ] && [ $mode -ne $VG_access_mode ]; then >+ if [ $vg_access_num -ne 4 ] && [ $mode -ne $vg_access_num ]; then > ocf_exit_reason "The specified vg_access_mode doesn't match the lock_type on VG metadata!" > exit $OCF_ERR_ARGS > fi >@@ -495,8 +500,8 @@ > fi > fi > >- # VG_access_mode specific checking goes here >- case ${VG_access_mode} in >+ # vg_access_num specific checking goes here >+ case ${vg_access_num} in > 1) > lvmlockd_check > ;; >@@ -731,7 +736,7 @@ > [ -z ${LV} ] && vol=${VG} || vol=${VG}/${LV} > ocf_log info "Activating ${vol}" > >- case ${VG_access_mode} in >+ case ${vg_access_num} in > 1) > lvmlockd_activate > ;; >@@ -773,7 +778,7 @@ > > ocf_log info "Deactivating ${vol}" > >- case ${VG_access_mode} in >+ case ${vg_access_num} in > 1) > lvmlockd_deactivate > ;; >@@ -807,16 +812,20 @@ > > case $__OCF_ACTION in > start) >+ read_parameters > lvm_validate > lvm_start > ;; > stop) >+ read_parameters > lvm_stop > ;; > monitor) >+ read_parameters > lvm_status > ;; > validate-all) >+ read_parameters > lvm_validate > ;; > meta-data)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1628659
: 1483124