[GitHub] cloudstack pull request: add DHCP lease folders for Ubuntu
GitHub user romain-dartigues opened a pull request: https://github.com/apache/cloudstack/pull/1552 add DHCP lease folders for Ubuntu Add "/var/lib/dhcp/*" to the search path for Ubuntu; tested under Ubuntu Precise and Trusty, not yet with newer releases. You can merge this pull request into a Git repository by running: $ git pull https://github.com/romain-dartigues/cloudstack feature_dhcp_ubuntu Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1552.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1552 commit 3bb70daeccbb96d77e04e15983ccee161ccbba4e Author: Romain Dartigues Date: 2016-05-18T21:34:19Z add DHCP lease folders for Ubuntu Add "/var/lib/dhcp/*" to the search path for Ubuntu; tested under Ubuntu Precise and Trusty, not yet with newer releases. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: systemvm - Python code cleanup
GitHub user romain-dartigues opened a pull request: https://github.com/apache/cloudstack/pull/1575 systemvm - Python code cleanup While debugging an issue on the System VM (to be reported later once we will have validated it behaviour); I took the opportunity to make some minor code clean-up in the Python scripts in the System-VM. Are you open to discuss about the future (improvements, conformance, automated testing) of thoses scripts? Have you something already planned on your side? Regards. You can merge this pull request into a Git repository by running: $ git pull https://github.com/romain-dartigues/cloudstack systemvm-pylint Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1575.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1575 commit fc1b1c48ed1c345af0ed4d9c680dc079cb40749c Author: Romain Dartigues Date: 2016-05-31T10:13:45Z systemvm: make pylint happy Mostly removing unused modules, but also defined some missing variables. commit 5d4c39184c103902108c3ac2e4f96f7ec5dc99c4 Author: Romain Dartigues Date: 2016-05-31T10:54:33Z systemvm: set_redundant.py non-working script Deleting set_redundant.py as it can not work (call config.set_cl() and config.get_cmdline() which are nowhere to be found). commit e863e968fd8233d1df929b3d333c87fccfda0c18 Author: Romain Dartigues Date: 2016-05-31T13:08:39Z systemvm: pylint conformance work in progress I kept the changes at the minimum to make pylint happy, I don't expect regressions. Using default configuration: > Your code has been rated at 8.92/10 (previous run: 7.81/10, +1.11) * pylint 1.5.5, * astroid 1.4.5 * Python 2.7.11 (default, Feb 22 2016, 09:22:43) * [GCC 4.8.2] Previous run is before the patch: +---++---+--++ | type | number | % | previous | difference | +===++===+==++ | code | 3569 | 64.76 | 3582 | -13.00 | +---++---+--++ | docstring |356 | 6.46 | 330 | +26.00 | +---++---+--++ | comment |773 | 14.03 | 788 | -15.00 | +---++---+--++ | empty |813 | 14.75 | 820 | -7.00 | +---++---+--++ +++--++ | type | number | previous | difference | +++==++ | convention |261 | 466 | -205 | +++--++ | refactor | 28 | 48 | -20 | +++--++ | warning| 43 | 185 | -143 | +++--++ | error | 4 |5 |-1 | +++--++ --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: systemvm - Python code cleanup
Github user romain-dartigues commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1575#discussion_r65191566 --- Diff: systemvm/patches/debian/config/opt/cloud/bin/set_redundant.py --- @@ -1,47 +0,0 @@ -#!/usr/bin/python --- End diff -- True, I haven't looked for references from the root of the project, my bad... Unfortunately that mean the [test/systemvm](/apache/cloudstack/tree/8a2391336c305a0209b70062ccdd41bbe0bdff44/test/systemvm) are underused, because the method `set_cl` has been removed a while ago by bdda01d2695ef4426857a85ec435cefcab3a0362. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: systemvm - Python code cleanup
Github user romain-dartigues commented on the pull request: https://github.com/apache/cloudstack/pull/1575 Thank you @wido for pointing it. Some problems are still present in #1547; should I wait it to be merged to redo the patch on top of it or do you have other suggestions? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1575: systemvm - Python code cleanup
Github user romain-dartigues commented on the issue: https://github.com/apache/cloudstack/pull/1575 Sorry, I missed your post and I'm not sure @swill question was addressed to me, but if it's the case: this is purely code cleanup and a few bugfixes (only due to typo in code). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request #1603: Vrouter fixes pylint
GitHub user romain-dartigues opened a pull request: https://github.com/apache/cloudstack/pull/1603 Vrouter fixes pylint In my dreams, all Python code pass through pylint and must validate before a merge. This merge request is becoming quite big, maybe too much; I'd like to have the owners opinion. It follow the previous pull requests: * #1575 + PCextreme/cloudstack/pull/2 - #1547 You can merge this pull request into a Git repository by running: $ git pull https://github.com/romain-dartigues/cloudstack vrouter-fixes-pylint Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1603.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1603 commit ffee6146e28013676b5eca200492324c1022682b Author: Romain Dartigues Date: 2016-06-01T11:58:07Z systemvm: make pylint happy Mostly removing unused modules, but also defined some missing variables. 40 'X' imported but unused 9 'from X import *' used; unable to detect undefined names 9 local variable 'X' is assigned to but never used 1 redefinition of unused 'X' from line Y 1 undefined name 'X' commit 77a53d06107822fd69b940a0769d00cbbeef81b2 Author: Romain Dartigues Date: 2016-07-04T12:00:06Z rebase in progress; onto 1f9bf93 You are currently rebasing branch 'vrouter-fixes-pylint' on '1f9bf93' commit 8c6372c1c21062bfbd876dc751a94108e49c2e20 Author: Romain Dartigues Date: 2016-06-02T06:52:00Z systemvm: pylint conformance work in progress Few more code conformity (long lines and such). Rebased after merge e4ba640. Your code has been rated at 7.41/10 (previous run: 5.04/10, +2.37) Raw metrics --- +--+---+--+-+---+ |type |number |% |previous |difference | +==+===+==+=+===+ |code |4179 |62.09 |4161 |+18.00 | +--+---+--+-+---+ |docstring |385|5.72 |367 |+18.00 | +--+---+--+-+---+ |comment |1122 |16.67 |1087 |+35.00 | +--+---+--+-+---+ |empty |1045 |15.53 |1042 |+3.00 | +--+---+--+-+---+ Messages by category +---+---+-+---+ |type |number |previous |difference | +===+===+=+===+ |convention |866|1095 |-229.00| +---+---+-+---+ |refactor |34 |55 |-21.00 | +---+---+-+---+ |warning|76 |699 |-623.00| +---+---+-+---+ |error |3 |13 |-10.00 | +---+---+-+---+ commit 38a36b5da0bcda58d670a135040739b52569a827 Author: Romain Dartigues Date: 2016-07-05T06:40:41Z refactor monitorServices.py, lots of changes Could be simplified by using the stdlib modules logging and json. Messages by category +++--++ | type | number | previous | difference | +++==++ | convention | 5 | 115 |-110.00 | +++--++ | refactor | 1 |4 | -3.00 | +++--++ | warning| 6 | 39 | -33.00 | +++--++ | error | 0 |0 |= | +++--++ Global evaluation - Your code has been rated at 9.40/10 (previous run: 3.01/10, +6.39) commit c558c767e5b400a14fbdaca5c345abc48372adec Author: Romain Dartigues Date: 2016-07-05T06:42:19Z systemvm: pylint conformance work in progress Raw metrics --- +--+---+--+-+---+ |type |number |% |previous |difference | +==+===+==+=+===+ |code | 4426 |62.50 |4179 | +247.00 | +--+---+--+-+---+ |docstring | 496 | 7.00 | 385 | +111.00 | +--+---+--+-+---+ |comment | 1130 |15.96 |1122 | +8.00 | +--+---+--+-+---+ |empty | 1030 |14.54 |1045 |-15.00 |
[GitHub] cloudstack issue #1575: systemvm - Python code cleanup
Github user romain-dartigues commented on the issue: https://github.com/apache/cloudstack/pull/1575 As suggested by @wido, rebase + new pull request in #1603. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request #1575: systemvm - Python code cleanup
Github user romain-dartigues closed the pull request at: https://github.com/apache/cloudstack/pull/1575 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request #1604: improvement: systemvm slow operations
GitHub user romain-dartigues opened a pull request: https://github.com/apache/cloudstack/pull/1604 improvement: systemvm slow operations On our setup we had issues with vrouters when a large number of VM were created at once. The vrouters try to arping the gateway (to refresh the ARP cache I suppose), but in some case it take too much time and the vrouters got killed for being unresponsive. The following patches attempt to solve this by: * a96ab18f, 8908371b defensive fix, maybe a bug? * fce10c55 do not block on arping command This patch has been running for a month on our test environment and seems to solve the initial problem. You can merge this pull request into a Git repository by running: $ git pull https://github.com/romain-dartigues/cloudstack systemvm-none-gateway Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1604.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1604 commit a96ab18fbed6f3411c0cd6062a6fbd799e3f4198 Author: Romain Dartigues Date: 2016-05-31T08:21:11Z systemvm: ips.json without gateway The file "/etc/cloudstack/ips.json" is generated with a gateway at "None" even when the gateway is present in the input "cmd_line.json". commit 8908371b213cb50f628b64637fedfda97201d33f Author: Romain Dartigues Date: 2016-05-31T08:34:35Z systemvm: do not arping None If the gateway is None, don't bother arping it. commit fce10c55a0d482751e4736663d32aae00733b913 Author: Romain Dartigues Date: 2016-05-31T09:02:09Z systemvm: arping in background Do not wait for :man:`arping(8)` to complete to continue. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1603: Vrouter fixes pylint
Github user romain-dartigues commented on the issue: https://github.com/apache/cloudstack/pull/1603 Hi @The-Loeki, and thank you for your prompt comment! For your side notes: * this is mostly a preference, I don't care what you use but here are my argument for the `%s`: + more portable than the `.format()` (Python 2.4 â Python 3) + coherent with `logging` methods; ie: `logging.debug('foo {}', 'bar')` = `TypeError`, the correct syntax is `logging.debug('foo %s', 'bar')` * I also prefer single quotes, especially because double quotes are never "nessary" (in Python single and double are equivalent) I didn't want to change "too much" (well, I think my patch is already too much; we should focus on documentation after that); if I did replace all double quote with single, for example, I would break `git blame` way too much for my taste. But I'm totally willing to put some more work for conformity, if there is a will for it upstream ;^) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1604: improvement: systemvm slow operations
Github user romain-dartigues commented on the issue: https://github.com/apache/cloudstack/pull/1604 @syed > there could be a possibility of having an ipv6 gateway Right, but IPv6 does not use ARP but [NDP](https://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol) ([RFC 4861](https://tools.ietf.org/html/rfc4861)). > do we know why the arping is failing? Apparently because the file "/etc/cloudstack/ips.json" is generated with a gateway at "None" even when the gateway is present in the input "cmd_line.json" (but my memory could fail me at this time of the day). One month ago we found the "problem" and wanted a fix; trying to understand *why* it did happen made me start #1575 (now #1603). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1603: Vrouter fixes pylint
Github user romain-dartigues commented on the issue: https://github.com/apache/cloudstack/pull/1603 OK, will get back on it during the week. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1603: Vrouter fixes pylint
Github user romain-dartigues commented on the issue: https://github.com/apache/cloudstack/pull/1603 Done. Le me know what you think about it (I don't think Jenkins failed because of my edits?). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1604: improvement: systemvm slow operations
Github user romain-dartigues commented on the issue: https://github.com/apache/cloudstack/pull/1604 @rhtyd < JIRA issue [#9568](https://issues.apache.org/jira/browse/CLOUDSTACK-9568) I'll rebase as soon as possible. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1604: improvement: systemvm slow operations
Github user romain-dartigues commented on the issue: https://github.com/apache/cloudstack/pull/1604 @rhtyd pong (is it OK like that? please advise) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1604: improvement: systemvm slow operations
Github user romain-dartigues commented on the issue: https://github.com/apache/cloudstack/pull/1604 I'll need help to understand what gone wrong. I just peeked at `pr1604-t379-kvm-centos7/test_vpc_router_nics_CC22OE/results.txt` and: `TestVPCNics: DEBUG: SSH result: [u'PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.', u'64 bytes from 8.8.8.8: icmp_seq=1 ttl=52 time=15.6 ms', u'64 bytes from 8.8.8.8: icmp_seq=2 ttl=52 time=15.8 ms', u'64 bytes from 8.8.8.8: icmp_seq=3 ttl=52 time=15.7 ms', u'', u'--- 8.8.8.8 ping statistics ---', u'3 packets transmitted, 3 received, 0% packet loss, time 1999ms', u'rtt min/avg/max/mdev = 15.617/15.723/15.804/0.164 ms']; COUNT is ==> 0` But `" 0% packet loss"` is in the string. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request #1604: improvement: systemvm slow operations
Github user romain-dartigues commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1604#discussion_r89310394 --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsHelper.py --- @@ -179,12 +179,12 @@ def get_hostname(): return line.strip() -def execute(command): +def execute(command, wait=True): """ Execute command """ logging.debug("Executing: %s" % command) p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) -result = p.communicate()[0] -return result.splitlines() +if wait: +return p.communicate()[0].splitlines() --- End diff -- @jburwell < I think your request, while valid, goes beyond the scope of this patch which was made to fix a problem we have in production. To wait for an amount of time, it would be required to spawn a separate thread, as the `timeout` argument was added in Python 3 (3.2 I think). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1604: improvement: systemvm slow operations
Github user romain-dartigues commented on the issue: https://github.com/apache/cloudstack/pull/1604 @rhtyd < separate function done. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack issue #1604: improvement: systemvm slow operations
Github user romain-dartigues commented on the issue: https://github.com/apache/cloudstack/pull/1604 @murali-reddy I'm not in position to run tests anymore @dpassante could you take the lead for it? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---