Skip to content

feat: Introduce extra volume flag for servers - #97

Merged
pacospace merged 2 commits into
mainfrom
feature-extra-disk
Jul 31, 2026
Merged

feat: Introduce extra volume flag for servers#97
pacospace merged 2 commits into
mainfrom
feature-extra-disk

Conversation

@pacospace

@pacospace pacospace commented Mar 27, 2026

Copy link
Copy Markdown
Member

Fixes: #95

  • create backend methods
  • enable feature
  • add methods when vm are deleted (pre_delete_server)
  • fix existing tests
  • add tests

Create a VM with two attached volumes

((newtestewccli) ) murdaca@fra-dev-new:~/work-ewc/ewccli-github$ ewc infra --profile eumetsat-ecis-r1-internal-ewc-coreservicesope create test-volume-vm --extra-volume 10 --extra-volume 11
[07/29/26 07:22:38] INFO     Using `eumetsat-ecis-r1-internal-ewc-coreservicesope` profile.                             
[07/29/26 07:22:38] INFO     SSH private and public keys are matching! Continuing...                                    
                    INFO     The server will be deployed on EUMETSAT side of the EWC.                                   
                    INFO     Pre deploy server setup starting...                                                        
                    INFO     Using default CPU image Rocky-9...                                                         
[07/29/26 07:22:40] INFO     Keypair 'murdaca-ewccli-keypair' already exists on Openstack. Using this key to deploy the 
                             VM.                                                                                        
                    INFO     Deploy server test-volume-vm starting...                                                   
     🧾 Server Configuration Inputs Summary      
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Parameter          ┃ Value                    ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Image              │ Rocky-9.7-20260519081947 │
│ Flavour            │ 4cpu-4gbmem              │
│ Network            │ private                  │
│ Security Groups    │ ssh                      │
│ Keypair            │ murdaca-ewccli-keypair   │
│ Extra Volumes [GB] │ 10, 11                   │
└────────────────────┴──────────────────────────┘
                    INFO     [Deploy server] Requesting server from Openstack...                                        
[07/29/26 07:22:40] INFO     ⏳ This could take a few minutes, grab a coffee ☕️ meanwhile...                            
                    INFO     Creating test-volume-vm (attempt n.1/1)...                                                 
[07/29/26 07:22:46] INFO     Waiting for test-volume-vm...                                                              
[07/29/26 07:23:28] INFO     Successfully created server test-volume-vm.                                                
             Openstack Server: test-volume-vm             
                  ╷                                       
  Name            │ test-volume-vm                        
  Status          │ ACTIVE                                
  Flavor          │ 4cpu-4gbmem                           
  Image           │ Rocky-9.7-20260519081947              
  Networks        │ network-private-fixed (10.0.0.231)    
  Security Groups │ ssh                                   
  ID              │ a8234dfe-a713-423e-9a2d-7ed1336873df  
                  ╵                                       
                    INFO     Post deploy server setup starting...                                                       
[07/29/26 07:23:31] INFO     Post deploy: creating and attaching extra volumes: (10, 11)                                
[07/29/26 07:23:31] INFO     Creating volumes (attempt 1/2)                                                             
                    INFO     Creating volume test-volume-vm-vol-1-1785309811 (10 GB)                                    
[07/29/26 07:23:32] INFO     Creating volume test-volume-vm-vol-2-1785309812 (11 GB)                                    
                    INFO     Waiting for volume test-volume-vm-vol-1-1785309811 to become available                     
[07/29/26 07:23:34] INFO     Waiting for volume test-volume-vm-vol-2-1785309812 to become available                     
[07/29/26 07:23:34] INFO     Successfully created volumes.                                                              
                    INFO     Attaching volumes to server a8234dfe-a713-423e-9a2d-7ed1336873df (attempt 1/2)             
                    INFO     Creating attachment for volume test-volume-vm-vol-1-1785309811                             
                             (0de0f47b-e67f-4d60-92c2-d9b2e05f600d)                                                     
[07/29/26 07:23:36] INFO     Creating attachment for volume test-volume-vm-vol-2-1785309812                             
                             (1cd42374-ed09-47a0-9e20-56f76cbdb7a5)                                                     
[07/29/26 07:23:38] INFO     Waiting for volume test-volume-vm-vol-1-1785309811 to become in-use                        
[07/29/26 07:23:43] INFO     Waiting for volume test-volume-vm-vol-2-1785309812 to become in-use                        
[07/29/26 07:23:49] INFO     Successfully attached 2 volumes to server a8234dfe-a713-423e-9a2d-7ed1336873df.            
🚀 Deployment Complete
Item: test-volume-vm server has been successfully deployed.

⚠️ No external IP requested
You can log in to the VM from another machine in your tenancy with:

ssh -i /home/murdaca/.ssh/id_rsa cloud-user@10.0.0.231

checking from the ewccli

((newtestewccli) ) murdaca@fra-dev-new:~/work-ewc/ewccli-github$ ewc infra --profile eumetsat-ecis-r1-internal-ewc-coreservicesope show test-volume-vm
[07/29/26 13:31:20] INFO     Using `eumetsat-ecis-r1-internal-ewc-coreservicesope` profile.                             
                          Openstack Server: test-volume-vm                          
                     ╷                                                              
  Name               │ test-volume-vm                                               
  Status             │ ACTIVE                                                       
  Flavor             │ 4cpu-4gbmem                                                  
  Image              │ Rocky-9.7-20260519081947                                     
  Networks           │ network-private-fixed (10.0.0.237)                           
  Security Groups    │ ssh                                                          
  Root volume [GB]   │ f2f86ca9-5493-455c-a571-13f31c03e18b [30] (mount: /dev/vda)  
  Extra volumes [GB] │ test-volume-vm-vol-1-1785317698 [10] (mount: /dev/vdb)       
                     │ test-volume-vm-vol-2-1785317699 [11] (mount: /dev/vdc)       
  ID                 │ f23a8404-cd64-418f-9a2d-4cfdfd568a12                                              

On Openstack side:
image

Delete VM:

((newtestewccli) ) murdaca@fra-dev-new:~/work-ewc/ewccli-github$ ewc infra --profile eumetsat-ecis-r1-internal-ewc-coreservicesope delete test-volume-vm
[07/29/26 07:57:27] INFO     Using `eumetsat-ecis-r1-internal-ewc-coreservicesope` profile.                             
[07/29/26 07:57:30] INFO     Pre delete server steps starting...                                                        
                    INFO     Server has 3 attached volumes.                                                             
                    INFO     Found 2 ewccli volumes to detach/delete                                                    
[07/29/26 07:57:30] INFO     Detaching volumes from server a8234dfe-a713-423e-9a2d-7ed1336873df (attempt 1/2)           
                    INFO     Detaching volume test-volume-vm-vol-1-1785309811 (0de0f47b-e67f-4d60-92c2-d9b2e05f600d)    
                             from server a8234dfe-a713-423e-9a2d-7ed1336873df                                           
                    INFO     Waiting for volume test-volume-vm-vol-1-1785309811 to return to 'available'                
[07/29/26 07:57:34] INFO     Detaching volume test-volume-vm-vol-2-1785309812 (1cd42374-ed09-47a0-9e20-56f76cbdb7a5)    
                             from server a8234dfe-a713-423e-9a2d-7ed1336873df                                           
[07/29/26 07:57:35] INFO     Waiting for volume test-volume-vm-vol-2-1785309812 to return to 'available'                
[07/29/26 07:57:39] INFO     Deleting volume test-volume-vm-vol-1-1785309811 (0de0f47b-e67f-4d60-92c2-d9b2e05f600d)     
[07/29/26 07:57:41] INFO     Deleting volume test-volume-vm-vol-2-1785309812 (1cd42374-ed09-47a0-9e20-56f76cbdb7a5)     
[07/29/26 07:57:43] INFO     Successfully detached and deleted 2 volumes.                                               
                    INFO     Pre delete server steps finished successfully                                              
[07/29/26 07:57:43] INFO     Deleting... (test-volume-vm)                                                               
[07/29/26 07:57:54] INFO     (test-volume-vm) deleted successfully.

@pacospace
pacospace requested a review from slothkong March 27, 2026 17:16
@pacospace
pacospace force-pushed the feature-extra-disk branch 7 times, most recently from 0ff0933 to 48bb679 Compare July 29, 2026 09:04
@pacospace

Copy link
Copy Markdown
Member Author

@pacospace
pacospace force-pushed the feature-extra-disk branch from 48bb679 to 6b3207a Compare July 29, 2026 13:31
@slothkong

Copy link
Copy Markdown
Contributor

Hey @pacospace,

I ran an independent manual test of this feature, together with #138. Both features achieve their target.

Note however that one of them (likely this feature branch) seem to have introduced a bug (see #139). The issue is minor and can be dealt with the regression separately.

More importantly:

  1. there were merge conflicts between this branch and fix-detach-externalip -> these have been resolved
  2. unittests on the fix-detach-externalip branch were not not passing -> I will try to address that here

@pacospace

Copy link
Copy Markdown
Member Author

Hey @pacospace,

I ran an independent manual test of this feature, together with #138. Both features achieve their target.

Note however that one of them (likely this feature branch) seem to have introduced a bug (see #139). The issue is minor and can be dealt with the regression separately.

More importantly:

  1. there were merge conflicts between this branch and fix-detach-externalip -> these have been resolved
  2. unittests on the fix-detach-externalip branch were not not passing -> I will try to address that here

Depends-On: meant that this PR was supposed to be merged first :D otherwise conflict would have been created because that was based on this one :)

@pacospace
pacospace merged commit 7331661 into main Jul 31, 2026
0 of 4 checks passed
@pacospace
pacospace deleted the feature-extra-disk branch July 31, 2026 07:27
@pacospace

Copy link
Copy Markdown
Member Author

Hey @pacospace,

I ran an independent manual test of this feature, together with #138. Both features achieve their target.

Note however that one of them (likely this feature branch) seem to have introduced a bug (see #139). The issue is minor and can be dealt with the regression separately.

More importantly:

  1. there were merge conflicts between this branch and fix-detach-externalip -> these have been resolved
  2. unittests on the fix-detach-externalip branch were not not passing -> I will try to address that here

Thanks for opening the bug issue, I will have a look!

ewc-semantic-releases Bot pushed a commit that referenced this pull request Aug 3, 2026
# [0.7.0](0.6.0...0.7.0) (2026-08-03)

### Bug Fixes

* ECMWF region names ([#141](#141)) ([5358cf6](5358cf6))
* Fix tests and external ip deletion ([#142](#142)) ([560f769](560f769))
* GPU flavour and GPU image mismatch ([#136](#136)) ([1f3d4af](1f3d4af))
* Release External IP when VM is deleted ([#138](#138)) ([24a3513](24a3513))

### Features

* Expose message output after ewc infra delete command ([#135](#135)) ([2922164](2922164))
* Include links into help command ([#145](#145)) ([4f70a34](4f70a34))
* Introduce extra volume flag for servers ([#97](#97)) ([7331661](7331661))
* Show also keypair in ewc infra list command ([#134](#134)) ([d6d9173](d6d9173))
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

Successfully merging this pull request may close these issues.

[FEATURE] Add support for provisioning of VMs additional block storage

3 participants