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 2020/06/02 16:03:40 UTC

[GitHub] [cloudstack] GabrielBrascher opened a new issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

GabrielBrascher opened a new issue #4125:
URL: https://github.com/apache/cloudstack/issues/4125


   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and master branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   API
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on master branch.
   -->
   Issue was reproduced on (probably it happens also on 4.13.0,  4.13.1):
   ~~~
   4.12.0.0,
   4.14.0.0,
   master (4.15.0.0)
   ~~~
   
   ##### OS / ENVIRONMENT
   VMs are running on **KVM** nodes.
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   When changing the service offering of a VM from an offering that has **bytes_read_rate_max** configured, the VM does not update **bytes_read_rate_max**.
   
   For instance, if the new offering has **bytes_read_rate** higher than the previous offering **bytes_read_rate_max** then the VM will fail to start after changing to the new offering.
   
   ##### 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.
   -->
   
   Let's assume the follwoing offerings:
   
   ```
   mysql> select name, type, bytes_write_rate, bytes_write_rate_max from disk_offering where name="OldOffering" or name="NewOffering";
   +---------------+---------+------------------+----------------------+
   | name          | type    | bytes_write_rate | bytes_write_rate_max |
   +---------------+---------+------------------+----------------------+
   | OldOffering   | Service |        268435456 |            402653184 |
   | NewOffering   | Service |        536870912 |            805306368 |
   +---------------+---------+------------------+----------------------+
   ```
   
   1. Deploy VM with offering **OldOffering**
   ```
   (...)
     <iotune>
       <write_bytes_sec>268435456</write_bytes_sec>
       (...)
       <write_bytes_sec_max>402653184</write_bytes_sec_max>
       (...)
     </iotune>
   (...)
   ```
   
   2. Stopped VM and changed offering to **NewOffering** (via `changeServiceForVirtualMachine` command)
   
   3. VM fails to start with **NewOffering**.
   
   ```
   2020-06-02 09:28:53,882 WARN [resource.wrapper.LibvirtStartCommandWrapper] (agentRequest-Handler-3:null) (logid:7e3f6a86) LibvirtException 
   org.libvirt.LibvirtException: internal error: process exited while connecting to monitor: 2020-06-02T12:28:53.743449Z qemu-system-x86_64: -drive file=/mnt/37c2fbd0-8518-3c47-872d-1a1bc772372a/93164fa0-d5ae-417f-8e23-10303163c8c3,format=qcow2,if=none,id=drive-ide0-0-0,ser
   ial=93164fa0d5ae417f8e23,cache=none,throttling.bps-read=536870912,throttling.bps-write=536870912,throttling.iops-read=2000,throttling.iops-write=1000,throttling.bps-read-max=805306368,throttling.bps-write-max=402653184: 'serial' is deprecated, please use the correspondin
   g option of '-device' instead 
   2020-06-02T12:28:53.743499Z qemu-system-x86_64: -drive file=/mnt/37c2fbd0-8518-3c47-872d-1a1bc772372a/93164fa0-d5ae-417f-8e23-10303163c8c3,format=qcow2,if=none,id=drive-ide0-0-0,serial=93164fa0d5ae417f8e23,cache=none,throttling.bps-read=536870912,throttling.bps-write=536
   870912,throttling.iops-read=2000,throttling.iops-write=1000,throttling.bps-read-max=805306368,throttling.bps-write-max=402653184: bps_max/iops_max cannot be lower than bps/iops 
          at org.libvirt.ErrorHandler.processError(Unknown Source)
   ```
   
   Note that `throttling.bps-write=536870912` is higher than `throttling.bps-write-max=402653184`, which results on the above exception (`bps_max/iops_max cannot be lower than bps/iops`)
   
   The XML file used by libvirt to will have the following values on `<iotune>` section:
   
   ```
   (...)
     <iotune>
       <write_bytes_sec>536870912</write_bytes_sec>
       (...)
       <write_bytes_sec_max>402653184</write_bytes_sec_max>
       (...)
     </iotune>
   (...)
   ```
   
   ##### EXPECTED RESULTS
   
   1. Deployed VM with offering **OldOffering**
   ```
   (...)
     <iotune>
       <write_bytes_sec>268435456</write_bytes_sec>
       (...)
       <write_bytes_sec_max>402653184</write_bytes_sec_max>
       (...)
     </iotune>
   (...)
   ```
   
   2. Stopped VM and changed offering to **NewOffering**
   
   3. VM starts with **NewOffering** without any problem. XML updates the <iotune rate accordingly to the offering.
   
   ```
   (...)
     <iotune>
       <write_bytes_sec>536870912</write_bytes_sec>
       (...)
       <write_bytes_sec_max>805306368</write_bytes_sec_max>
       (...)
     </iotune>
   (...)
   ```
   
   ##### Observation:
   All seems to be working fine when changing the offering via UI (API command `scaleVirtualMachine`). The problem, therefore, is related to the API command `changeServiceForVirtualMachine`.


----------------------------------------------------------------
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] slavkap commented on issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   Hi all, I'm not sure exactly how the contribution works - I mean if somebody raise an issue (like this) does he/she should fix it or somebody else could propose a fix outside of the community? I think that I have a solution about the problem, and I've tested on 4.14. I've found that the volumes table isn't updated with the new offerings. So may I I open a PR for this or somebody else is working on it?


----------------------------------------------------------------
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] GabrielBrascher edited a comment on issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   @rhtyd @DaanHoogland I am not sure if this issue should be closed. The problem still exists but we applied workarounds by not using this API command.
   
   My proposal then would be to close this issue and start a discussion (or open a new issue) to verify the possibility of deprecating command `changeServiceForVirtualMachnie`.


----------------------------------------------------------------
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] GabrielBrascher commented on issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   @slavkap that would be great! If you have a fix,  feel free to open a PR and link this issue to the PR description :slightly_smiling_face: 


----------------------------------------------------------------
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] DaanHoogland commented on issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   @GabrielBrascher I *think* it should work as `scaleVirtualMachine` would only work if the offering allows it, would it?


----------------------------------------------------------------
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] GabrielBrascher commented on issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   Does Dows anyone know if this command is deprecated? API request `scaleVirtualMachine` worked fine and does pretty much the same as `changeServiceForVirtualMachine`.
   
   Any thoughts? @rhtyd @andrijapanicsb @wido @svenvogel @kiwiflyer @DaanHoogland and others.


----------------------------------------------------------------
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] slavkap commented on issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   Thanks @GabrielBrascher :)
   


----------------------------------------------------------------
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] DaanHoogland commented on issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   ok, best open a mail discuss, I am really against deprecating a API because it is broken for some use, but if we find that it is conceptually wrong, soit.
   Let{s keep this open in case someone feels inspired to fix the issue until discussion is closed.


----------------------------------------------------------------
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 #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   


----------------------------------------------------------------
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] GabrielBrascher commented on issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   @DaanHoogland this issue is clear about the problem (that still exists).
   
   Both of the merged PRs that are linked to this issue have nothing to do with **fixing** this API command, but instead, they are making sure to not use `changeServiceForVirtualMachnie`. That is why I mentioned (here https://github.com/apache/cloudstack/issues/4125#issuecomment-729679051) that we should either keep this issue open or then we need to discuss deprecating the problematic command; which might be the best option as the problematic issue is not being used and when it is used it causes problems
   
   #4341 refers to this issue just to mention that the manual tests failed due to using the problematic API command reported here, when changed to `scaleVirtualMachine` then the implementation at PR #4341 works fine.
   
   https://github.com/apache/cloudstack-primate/pull/818 regards to ensuring that the primate UI is not using the problematic API.


----------------------------------------------------------------
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] GabrielBrascher edited a comment on issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   Does anyone know if this command is deprecated? API request `scaleVirtualMachine` worked fine and does pretty much the same as `changeServiceForVirtualMachine`.
   
   Any thoughts? @rhtyd @andrijapanicsb @wido @svenvogel @kiwiflyer @DaanHoogland and others.


----------------------------------------------------------------
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] GabrielBrascher commented on issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   Just to avoid confusion and highlight the point regarding **deprecating**. The problematic command is buggy, with at least two open issues (#3110, and #4125) describing different issues on the same command.
   
   On the other hand, command `scaleVirtualMachine` does everything that `changeServiceForVirtualMachnie` does (and more), with a difference that one actually works and the other is a problem that we have been hiding for long by not using on UI.
   
   


----------------------------------------------------------------
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 #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   is this merged and can be closed @GabrielBrascher ?


----------------------------------------------------------------
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] GabrielBrascher commented on issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   @rhtyd @DaanHoogland I am not sure if this issue should be closed. The problem still exists but we applied workarounds by not using this API command.
   
   My proposal then would be to close this issue and start a discussion (or open a new issue) to verify the need to deprecate the command `changeServiceForVirtualMachnie`.


----------------------------------------------------------------
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] DaanHoogland commented on issue #4125: Command changeServiceForVirtualMachine fails to update read/write rate

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


   not sure what you are saying, @GabrielBrascher .
   1. the mentioned PR does not solve your problem, or the problem is still present in 4.14? Did you check master with #4341 merged?
   2. there is an API you think should be deprecated, as opposed to fixed? (/me says fix changeServiceForVirtualMachine or descibe the unexpected behaviour in the API-docs.)


----------------------------------------------------------------
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