You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/04/22 08:20:36 UTC

[GitHub] [cloudstack] NuxRo opened a new issue #4943: data-server breaks VM root password in multi-subnet SG zone

NuxRo opened a new issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943


   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
    
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   cloud-init
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on master branch.
   -->
   
   ~~~
   4.15
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, advanced networking, etc.  N/A otherwise
   -->
   Basiz zone with multiple subnets/CIDR
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   VMware 6.5 (limited access to environment, not "mine")
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   The VM password feature of cloud-init Cloudstack datasource attempts retrieval of the password from "data-server" host if it resolves. 
   What happens in a multi-CIDR basic zone is that the passwords for the VMs are stored in separate files, according to their subnet, eg:
   /var/cache/cloud/passwords-subnet1IP
   /var/cache/cloud/passwords-subnet2IP and so on
   The problem arises when Cloudstack adds the "data-server" hostname in /etc/hosts for dnsmasq to pick up, but because it adds it with subnet1IP, then requests for a password from a machine in subnet2 or subnet3 will go unanswered.
   
   The Cloudstack datasource does not handle this gracefully, it just fails setting a password instead of detecting there was no valid response and try to also ask the "dhcp_identifier" host.
   
   I suggest as a quick workaround to add a button somewhere to disable the data-server feature altogether. It seems to be Cloudstack specific, grepping for it in other data sources yielded nothing. 
   
   On the VMs right now we have to add "0.0.0.0 data-server" in /etc/hosts to make the root password work. I guess editing the /etc/hosts on the VR and remove the data-server entry might also work, until the next restart.
   
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   Deploy basic or adv+SG zone with multiple CIDRs, when asking for a password from a VM not in the primary CIDR this will fail, password will not be set.
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   data-server hostname should return a valid password regardless of which CIDR the request comes from.
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   Valid password not served.
   ~~~
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on issue #4943: data-server breaks VM root password in multi-subnet SG zone

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-824666213


   @NuxRo Basic zone with SG is not supported with VMware as you cannot implement host-based firewall (security groups). Only flat basic zone without SG is feasible with Vmware. Can you check with your user's env?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] ccycv commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
ccycv commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-890320836


   I just tested this in 4.15.1 Looks like the issue with "data-server" is persisting. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] ccycv edited a comment on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
ccycv edited a comment on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-834088038


   > cc @NuxRo @weizhouapache - any other suggestion/pointers for Darrin?
   
   I work with @NuxRo on this, try to replicate in cloudstack with basic network (multiple CIDR), not in an advanced network with shared and multiple CIDR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] ccycv commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
ccycv commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-834088038


   > cc @NuxRo @weizhouapache - any other suggestion/pointers for Darrin?
   
   I work with @NuxRo on this, try to replicate in cloudstack with basic network (multiple CIDR), not in an advanced network with shared and multiple CIRD. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-833475510


   @rhtyd this use case is rare I think.
   I will have a look


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-831689369


   @ccycv I added a new guest IP range using the UI, but I was not able to create any instances that use the IP range. I checked the DB and saw that the 2 IP ranges use different vlan_db_ids - So when the first range was exhausted, I expected the second range to be used, but instead, I got the insufficient capacity error - This is possibly a bug. I tried to reproduce this error on a basic network without success - meaning - I can't create an instance on a different IP range so I can't test the described scenario, I will try an advanced network next.
   ![Guest network](https://user-images.githubusercontent.com/49917670/116963301-c97fa100-aca8-11eb-9216-73d5bc1bb356.png)
   
   @NuxRo just to be sure, is this what you meant with multiple CIDRs?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-836277020


   @NuxRo @ccycv @Spaceman1984 
   I can confirm that there are 3 bugs related to this issue.
   (1) UI: Cannot deploy vm with specified IP in additional IP range. However, cloudmonkey/cmk works.
   (2) DHCP does not work, if there are free IPs in the first IP range.
   (3) password and userdata do not work (even if 2 works).
   
   @rhtyd I will work on this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] ccycv removed a comment on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
ccycv removed a comment on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-890320836


   I just tested this in 4.15.1 Looks like the issue with "data-server" is persisting. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 edited a comment on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
Spaceman1984 edited a comment on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-831689369


   @ccycv I added a new guest IP range using the UI, but I was not able to create any instances that use the IP range. I checked the DB and saw that the 2 IP ranges use different vlan_db_ids - So when the first range was exhausted, I expected the second range to be used, but instead, I got the insufficient capacity error - This is possibly a bug. I tried to reproduce this error on a basic network without success, meaning - I can't create an instance on a different IP range so I can't test the described scenario. I will try an advanced network next.
   ![Guest network](https://user-images.githubusercontent.com/49917670/116963301-c97fa100-aca8-11eb-9216-73d5bc1bb356.png)
   
   @NuxRo just to be sure, is this what you meant with multiple CIDRs?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-840424037


   Fixed in https://github.com/apache/cloudstack/pull/5013


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-833428833


   @Spaceman1984 I think all we want is a data-server to be resolvable for all sub-nets for cloud-init to work? Can you try this:
   - Create a shared network (in adv zone) with some range
   - Go to zone -> network -> guest network -> select shared network -> select IP -> add Range
   In legacy UI it looks like this:
   
   ![Screenshot from 2021-05-06 16-18-56](https://user-images.githubusercontent.com/95203/117286505-e8d42500-ae86-11eb-815b-1367bd85655c.png)
   
   As an example, I created shared network with 172.20.0.0/16 and then later added a 10.1.1.1/16 cidr.
   
   Then, test if you can use something like cloud-init or manually verify that `data-server` work for VMs on either CIDRs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd edited a comment on issue #4943: data-server breaks VM root password in multi-subnet SG zone

Posted by GitBox <gi...@apache.org>.
rhtyd edited a comment on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-824666213


   @NuxRo Basic zone with SG is not supported with VMware as you cannot implement host-based firewall (security groups) on ESXi. Only flat basic zone without SG is feasible with Vmware. Can you check with your user's env?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] ccycv commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
ccycv commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-834087064


   > @NuxRo @Spaceman1984
   > does dhcp work in your testing ?
   
   Yes, the IP is allocated on the VM.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-833658070


   @NuxRo @Spaceman1984 
   does dhcp work in your testing ?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on issue #4943: data-server breaks VM root password in multi-subnet SG zone

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-824666810


   ... meanwhile we'll see if we can replicate the issue with just basic zone (without SG) + vmware (and shared network + VMware on adv zone).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] NuxRo commented on issue #4943: data-server breaks VM root password in multi-subnet SG zone

Posted by GitBox <gi...@apache.org>.
NuxRo commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-824678618


   That is indeed true, sorry to mislead you, this is a flat network indeed, but the problems remains regardless.
   I'll update the issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-836434092


   @weizhouapache I'll let you proceed and unassign myself


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-836831241


   Thanks for picking up @weizhouapache 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd closed issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
rhtyd closed issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] ccycv commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
ccycv commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-829960243


   > Hi @NuxRo, how do you go about creating multiple CIDRs? I'm not sure I understand what you mean.
   
   Please check this, it is a bug, in 4.15 you can add only via API (or through old UI) : https://github.com/apache/cloudstack/issues/4697


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-833429120


   cc @NuxRo @weizhouapache - any other suggestion/pointers for Darrin?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on issue #4943: data-server breaks VM root password in multi-subnet flat network

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on issue #4943:
URL: https://github.com/apache/cloudstack/issues/4943#issuecomment-829938601


   Hi @NuxRo, how do you go about creating multiple CIDRs? I'm not sure I understand what you mean.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org