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

IP alias variables not removed from context.sh when deleting IP alias #3484

Closed
7 tasks
atodorov-storpool opened this issue Jul 6, 2019 · 10 comments
Closed
7 tasks

Comments

@atodorov-storpool
Copy link
Contributor

Description
When removing an alias IP the re-contextualization is triggered but context.sh in the CDROM is not updated - the context variables for the removed alias are still there and the contextualization test do not find a difference and the ip is not removed.

To Reproduce

  1. add some alias IPs
  2. remove an alias IP
  3. check the configured IPs in the VM

Expected behavior
The contextualization must step in and remove the alias IP from the VM

Details

  • Affected Component: [Core]
  • Hypervisor: [KVM]
  • Version: [5.8.3]

Additional context
It looks like that context.sh is generated before the VM metadata is updated. Because deleting a second IP alias will trigger the contextualization in the VM. And context.sh will have missing the variables for the previously removed alias ip...

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
@al3xhh
Copy link
Contributor

al3xhh commented Jul 8, 2019

Thanks for reporting the bug @atodorov-storpool! It has been fixed and will be released in the 5.8.4 hotfix version.

@atodorov-storpool
Copy link
Contributor Author

Thank you for the quick response!

Cheers,
Anton

@al3xhh
Copy link
Contributor

al3xhh commented Jul 15, 2019

Code: #3518
Docs: OpenNebula/docs#688

@al3xhh
Copy link
Contributor

al3xhh commented Jul 15, 2019

al3xhh pushed a commit to al3xhh/one that referenced this issue Jul 17, 2019
rsmontero pushed a commit that referenced this issue Jul 18, 2019
rsmontero added a commit that referenced this issue Jul 18, 2019
rsmontero added a commit that referenced this issue Jul 18, 2019
(cherry picked from commit 43be5cf)
rsmontero pushed a commit to OpenNebula/docs that referenced this issue Jul 18, 2019
@al3xhh al3xhh closed this as completed Jul 18, 2019
@atodorov-storpool
Copy link
Contributor Author

Hi @al3xhh

It looks like patch al3xhh@2e667af is not merged to one-5.8/master branches or there is another bug because context.sh in the VM's ISO is not updated on alias remove. There is no re-contextualization triggered in the VM.

Could you take another look on it? I think I've tested the patch against 5.8.3 and it worked...

@al3xhh
Copy link
Contributor

al3xhh commented Aug 5, 2019

Hello @atodorov-storpool we finally made a different solution, so now variables are not removed, but there is a new attribute in context to indicate that the alias is being detached. The changes in context packages aren't done yet, but there are issues for that in context repositories.

@atodorov-storpool
Copy link
Contributor Author

Hello @al3xhh,
I've managed to have alias detach flag, but it is on all alias IPs in the context. Not only on the removed one. Here is the context.sh received by the VM when detaching ALIAS3:

# Context variables generated by OpenNebula
DISK_ID='1'
ETH0_ALIAS0_CONTEXT_FORCE_IPV4=''
ETH0_ALIAS0_DETACH='YES'
ETH0_ALIAS0_DNS=''
ETH0_ALIAS0_EXTERNAL=''
ETH0_ALIAS0_GATEWAY=''
ETH0_ALIAS0_GATEWAY6=''
ETH0_ALIAS0_IP='192.168.122.6'
ETH0_ALIAS0_IP6=''
ETH0_ALIAS0_IP6_PREFIX_LENGTH=''
ETH0_ALIAS0_IP6_ULA=''
ETH0_ALIAS0_MAC='02:00:c0:a8:7a:06'
ETH0_ALIAS0_MASK=''
ETH0_ALIAS0_MTU=''
ETH0_ALIAS0_NETWORK=''
ETH0_ALIAS0_SEARCH_DOMAIN=''
ETH0_ALIAS0_VLAN_ID=''
ETH0_ALIAS0_VROUTER_IP=''
ETH0_ALIAS0_VROUTER_IP6=''
ETH0_ALIAS0_VROUTER_MANAGEMENT=''
ETH0_ALIAS3_CONTEXT_FORCE_IPV4=''
ETH0_ALIAS3_DETACH='YES'
ETH0_ALIAS3_DNS=''
ETH0_ALIAS3_EXTERNAL=''
ETH0_ALIAS3_GATEWAY=''
ETH0_ALIAS3_GATEWAY6=''
ETH0_ALIAS3_IP='192.168.122.7'
ETH0_ALIAS3_IP6=''
ETH0_ALIAS3_IP6_PREFIX_LENGTH=''
ETH0_ALIAS3_IP6_ULA=''
ETH0_ALIAS3_MAC='02:00:c0:a8:7a:07'
ETH0_ALIAS3_MASK=''
ETH0_ALIAS3_MTU=''
ETH0_ALIAS3_NETWORK=''
ETH0_ALIAS3_SEARCH_DOMAIN=''
ETH0_ALIAS3_VLAN_ID=''
ETH0_ALIAS3_VROUTER_IP=''
ETH0_ALIAS3_VROUTER_IP6=''
ETH0_ALIAS3_VROUTER_MANAGEMENT=''
ETH0_CONTEXT_FORCE_IPV4=''
ETH0_DNS='1.1.1.1'
ETH0_EXTERNAL=''
ETH0_GATEWAY='192.168.122.1'
ETH0_GATEWAY6=''
ETH0_IP='192.168.122.4'
ETH0_IP6=''
ETH0_IP6_PREFIX_LENGTH=''
ETH0_IP6_ULA=''
ETH0_MAC='02:00:c0:a8:7a:04'
ETH0_MASK='255.255.255.0'
ETH0_MTU='1500'
ETH0_NETWORK='192.168.122.0'
ETH0_SEARCH_DOMAIN=''
ETH0_VLAN_ID=''
ETH0_VROUTER_IP=''
ETH0_VROUTER_IP6=''
ETH0_VROUTER_MANAGEMENT=''
ETH_ALIAS_DETACH='YES'

@atodorov-storpool
Copy link
Contributor Author

And just noted that there is ETH_ALIAS_DETACH='YES'...

@al3xhh
Copy link
Contributor

al3xhh commented Aug 6, 2019

I will reopen the issue to take a look, thanks for noticing it @atodorov-storpool

@al3xhh al3xhh reopened this Aug 6, 2019
@al3xhh al3xhh modified the milestones: Release 5.8.4, Release 5.8.5 Aug 6, 2019
al3xhh pushed a commit to al3xhh/one that referenced this issue Aug 6, 2019
@al3xhh
Copy link
Contributor

al3xhh commented Aug 6, 2019

@atodorov-storpool I have fixed it, thanks again for trying it!

rsmontero pushed a commit that referenced this issue Aug 6, 2019
@al3xhh al3xhh closed this as completed Aug 6, 2019
atodorov-storpool pushed a commit to storpool/one that referenced this issue Aug 13, 2019
Signed-off-by: Anton Todorov <a.todorov@storpool.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants