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

LVM cleanup executes on master instead storage node #2352

Closed
7 tasks
kvaps opened this issue Aug 16, 2018 · 4 comments
Closed
7 tasks

LVM cleanup executes on master instead storage node #2352

kvaps opened this issue Aug 16, 2018 · 4 comments

Comments

@kvaps
Copy link
Contributor

kvaps commented Aug 16, 2018

Description
I just found out that fs_lvm/delete operation is executes on the main controller, but not in the compute node or any other node from BRIDGE_LIST

To Reproduce

  • Add echo "$0" "$@" >> /tmp/123 line to the fs_lvm/delete file
  • Create fs_lvm datastore with BRIDGE_LIST
  • Create VM
  • Remove VM
  • Check /tmp/123 on node and on container
  • On controller you will see the next output:
/var/lib/one/remotes/tm/fs_lvm/delete opennebula:/var/lib/one//datastores/138/5826/disk.0 5826 100

Expected behavior

opennebula - it is my controller node.
I expected some other name instead, like name of compute node or name of node from BRIDGE_LIST.

/var/lib/one/remotes/tm/fs_lvm/delete <some_other_node>:/var/lib/one//datastores/138/5826/disk.0 5826 100

Details

  • Affected Component: Storage drivers
  • Hypervisor: KVM
  • Version: 5.6.0

Additional context

There is also cleanup procedure before creating and resizing drive, so, it is up to discussion is that really needed here to cleanup it twice.

Progress Status

  • Branch created
  • Code committed to development branch
  • Testing - QA
  • Documentation
  • Release notes - resolved issues, compatibility, known issues
  • Code committed to upstream release/hotfix branches
  • Documentation committed to upstream release/hotfix branches
@rsmontero
Copy link
Member

All actions are executed locally. Each action then ssh to the target host (if needed, depending on the driver and/or specific action). For example in fs_lvm/delete, you have:

if [ -n "${DS_SYS_ID}" ]; then                                                        
    ssh_exec_and_log "$DST_HOST" "$ZERO_CMD" \                                        
        "Error cleaning $DST_PATH"                                                    
                                                                                      
    LOCK="tm-fs_lvm-${DS_SYS_ID}.lock"                                                
    exclusive "${LOCK}" 120 ssh_exec_and_log "$DST_HOST" "$DELETE_CMD" \              
        "Error deleting $DST_PATH"                                                    
else                                                                                  
    ssh_exec_and_log "$DST_HOST" "$DELETE_CMD" \                                      
        "Error deleting $DST_PATH"  

ssh_exec_and_log do the ssh part.

@kvaps
Copy link
Contributor Author

kvaps commented Aug 16, 2018

I just found that this is happens because this action is actualy use not for system datastore but for images datastore, for cleanup non persistent drives, and took BRIDGE_LIST parameter from it.

Sorry wrong bug.

@kvaps
Copy link
Contributor Author

kvaps commented Apr 1, 2019

I was wrong about wrong bug. Bug is still there:

To Reproduce

  • Deploy new VM
  • Undeploy this VM
  • Destroy this VM

You will see that driver action will be called with wrong DST_HOST in the path (there will be controller hostname)

  • Then try to recover --retry

You will see that driver action will be called with right DST_HOST in the path (there will be hostname of the last compute node)
You wil lse that driver action

Please reopen issue.

rsmontero pushed a commit that referenced this issue Apr 17, 2019
rsmontero pushed a commit that referenced this issue Apr 17, 2019
…ation issues (#3201)

Signed-off-by: kvaps <[email protected]>
(cherry picked from commit 99ded0f)
kvaps added a commit to kvaps/opennebula-addon-linstor_un that referenced this issue Jul 12, 2019
rsmontero pushed a commit that referenced this issue Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants