31322 Commits

Author SHA1 Message Date
Rohit Yadav
3db1746c03 Merge branch '4.11' 2018-02-26 15:32:20 +01:00
Nicolas Vazquez
703054964a CLOUDSTACK-10305: Rare race condition in KVM migration (#2466)
There is a race condition in the monitoring of the migration process on KVM. If the monitor wakes up in the tight window after the migration succeeds, but before the migration thread terminates, the monitor will get a LibvirtException “Domain not found: no domain with matching uuid” when checking on the migration status. This in turn causes CloudStack to sync the VM state to stop, in which it issues a defensive StopCommand to ensure it is correctly synced.

Fix: Prevent LibvirtException: "Domain not found" caused by the call to dm.getInfo()
2018-02-26 15:31:51 +01:00
Rene Moser
2a5459d517 cleanup commented out code 2018-02-26 11:57:44 +01:00
Rafael Weingärtner
06ef61b96d
Merge pull request #2443 from rafaelweingartner/CLOUDSTACK-9338
[CLOUDSTACK-9338] ACS is not accounting resources of VMs with custom service offering properly
2018-02-23 11:07:38 -03:00
Rafael Weingärtner
f8d98fd1d0
Merge pull request #2451 from Accelerite/CLOUDSTACK-10284
CLOUDSTACK-10284:Creating a snapshot from VM Snapshot generates error if hypervisor is not KVM.
2018-02-23 07:55:19 -03:00
Rafael Weingärtner
d0ec2611f7 Forward merge #2454 merged on '4.11' branch
[CLOUDSTACK-10283] Sudo to setup agent keystore, fail on host add.
2018-02-22 19:47:47 -03:00
Rafael Weingärtner
cae3292560
Merge pull request #2454 from shapeblue/keystore-utils-sudoer
CLOUDSTACK-10283: Sudo to setup agent keystore, fail on host add failure
2018-02-22 19:44:24 -03:00
Rafael Weingärtner
06c2948c65
Merge pull request #2457 from HiagData/CLOUDSTACK-10295
CLOUDSTACK-10295 Marvin: add support for password-enabled templates
2018-02-22 19:41:39 -03:00
Rafael Weingärtner
e9da30b24e
Merge pull request #2456 from rafaelweingartner/CLOUDSTACK-10293
[CLOUDSTACK-10293] Single view network ACL rules listing
2018-02-22 19:36:09 -03:00
Rafael Weingärtner
a4364267e7 Externalize ICMP type/code and add new ACL rule descriptions in property files 2018-02-21 09:59:46 -03:00
Rene Moser
bff7c01f19 CLOUDSTACK-10299: UI: fix error in network listing in project mode 2018-02-20 16:48:23 +01:00
Rafael Weingärtner
c8d9754b43 Remove dead code in DatabaseUpgradeChecker 2018-02-20 08:07:14 -03:00
Rafael Weingärtner
0081dca825 Create database path upgrade from 4.11.0.0 to 4.12.0.0 2018-02-20 08:04:35 -03:00
Rafael Weingärtner
e532b574dd Forward merge #2402 merged on '4.11' branch
[CLOUDSTACK-10128] Simplify the search for hosts to execute commands
2018-02-19 18:05:00 -03:00
Rafael Weingärtner
264036bd2c
Merge pull request #2402 from rafaelweingartner/fixCLOUDSTACK-10128
[CLOUDSTACK-10128] Simplify the search for host to execute command
2018-02-19 17:54:01 -03:00
Rafael Weingärtner
689715504c [CLOUDSTACK-10293] Single view network ACL rules listing
The ACL rules editing/addition page is not user-friendly. Users are not able to see in a single view all of the detail of the ACL rule (they need to use a scroll bar on the horizontal). The problem becomes worse when there are a considerable number of rules. Therefore, we are proposing the following changes:

1- Instead of using the table to create new ACL, we can create a button like the one presented in attached pictures, where users can click, and then a modal popup would appear and users would be able to create the new ACL there. This is similar to the workings of the ACL edit button.
2 - Remove the ability to add new ACL via table where they are presented. All ACLs should be entered via the “New ACL” button. Therefore, the section “Add ACL” would be removed as well;
3 - Move the action section of the list ACL table to the most left position;

These changes would reduce the information in the table and facilitate users to add new rules and easily edit them as well.
2018-02-18 22:47:13 -03:00
Dmytro Shevchenko
eeba3e4853 CLOUDSTACK-10295 Marvin: add support for password-enabled templates 2018-02-15 21:06:17 +02:00
Wido den Hollander
6233a77d15 CLOUDSTACK-10294: PEP-8 fixes and enhancements to security_group.py (#2432)
- We should return a boolean and not a String 'true' or 'false'. Although this output is never checked by the calling function(s).
- Do not use == False or == None as that is not according to the Python specs.
- Calling just print 'hello' is deprecated and won't work in newer Python versions. We should use the print() function.
- Remove unused and commented function.
- Use logging.warning() instead of logging.warn()
- Use subprocess.check_output() for execution. This is the Python way of executing commands.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2018-02-15 14:28:27 +01:00
Rohit Yadav
39415b7044 Merge branch '4.11' 2018-02-15 10:44:34 +01:00
Marc-Aurèle Brothier
97441a82f9 CLOUDSTACK-10282: ipv6 firewall rules operation should be done with ip6tables (#2450)
For ipv6 firewall rules operation should be done with ip6tables.
2018-02-15 10:09:23 +01:00
Nitesh Sarda
37e5d36316 CLOUDSTACK-10284:Creating a snapshot from VM Snapshot generates error if hypervisor is not KVM. 2018-02-14 22:33:32 +05:30
Rohit Yadav
f1cf5f97e9 CLOUDSTACK-10283: Sudo to setup agent keystore, fail on host add failure
This would make keystore utility scripts being executed as sudoer
in case the process uid/owner is not root but still a sudoer user.

Also fails addHost while securing a KVM host and if keystore fails to be
setup for any reason.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-02-14 13:08:20 +01:00
Rohit Yadav
f96398c127 Merge branch '4.11' 2018-02-14 11:56:00 +01:00
Rohit Yadav
3109c590e3
CLOUDSTACK-10285: Fix db upgrade failure for 4.10.0.0 users (#2452)
4.10.0.0 users when upgrade to 4.11.0.0 may face db related
discrepancies due to some PRs that got merged without moving their sql
changes to 4.10->4.11 upgrade path. The 4.10.0.0 users can run those
missing sql statements manually and then upgrade to 4.11.0.0, since a
workaround like this is possible this ticket is not marked a blocker. In
4.11.1.0+, we'll move those changes from 4.9.3.0->4.10.0.0 upgrade path
to 4.10.0.0->4.11.0.0 upgrade path. Ideally we should not be doing this,
but this will fix issues for a future 4.10.0.0 user who may want to
upgrade to 4.11.1.0 or 4.12.0.0+.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-02-14 11:54:19 +01:00
Frank Maximus
dee5bb527e CLOUDSTACK-10261: Libvirt metadata create only one nuage-extension xml tag (#2441) 2018-02-12 12:06:44 +01:00
Rohit Yadav
b88681de18 Merge branch '4.11' 2018-02-10 18:32:46 +01:00
Nicolas Vazquez
b2a19f7587 CLOUDSTACK-10247: L2 network not shared on projects (#2420)
When trying to deploy a vm providing a project id and a L2 network id, this error is logged.
2018-02-10 18:29:41 +01:00
Nicolas Vazquez
6e09529bde CLOUDSTACK-10251: HTTPS downloader for Direct Download templates failure (#2424)
Failure on HTTPS downloader for Direct Download templates on KVM.
Reason: Incorrect request caused NullPointerException getting the response InputStream
2018-02-10 18:28:59 +01:00
Wido den Hollander
ce67726c6d CLOUDSTACK-10243: Do not use wait() on Python subprocess (#2421)
This might (and does block) in certain situations on the VR as
also explained in the Python documentation:

https://docs.python.org/2/library/subprocess.html#subprocess.Popen.wait

  Warning This will deadlock when using stdout=PIPE and/or stderr=PIPE
  and the child process generates enough output to a pipe such that
  it blocks waiting for the OS pipe buffer to accept more data.
  Use communicate() to avoid that.

Using the check_output function handles most of this for us and
also provides better error handling.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2018-02-10 18:27:00 +01:00
Dingane Hlaluku
38ccbfb79c CLOUDSTACK-9663: updateRole cmd to return updated role as JSON (#2406)
This fixes updateRole to return a role response, like other update APIs.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-02-10 18:25:25 +01:00
Sigert Goeminne
8949efe8d1 CLOUDSTACK-10218: Fix for forced network update in a nuage network (#2445)
Fix for forced network update to a nuage network offering with vr fails with IllegalArgumentException.
Addressed review comments DaanHoogland.
2018-02-10 18:24:01 +01:00
Rohit Yadav
1c26b2ec2e Merge remote-tracking branch 'origin/4.11'
CLOUDSTACK-10269: On deletion of role set name to null (#2444)
CLOUDSTACK-10146 checksum in java instead of script (#2405)
CLOUDSTACK-10222: Clean snaphosts from primary storage when taking (#2398)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-02-09 11:53:20 +01:00
Rohit Yadav
0befb2cceb CLOUDSTACK-10269: On deletion of role set name to null (#2444)
During deletion of role, set name to null. This fixes concurrent
exception issue where previously it would rename the deleted role
with a timestamp.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-02-09 09:49:23 +01:00
dahn
123c20dc57
CLOUDSTACK-10146 checksum in java instead of script (#2405)
* CLOUDSTACK-10146 checksum in java instead of script

* root cause passing
2018-02-07 10:48:51 +01:00
Rafael Weingärtner
601d095d71 Python automated test case for updateResourceCount API method 2018-02-06 21:16:23 -02:00
Khosrow Moossavi
94776fbfd0 CLOUDSTACK-10222: Clean snaphosts from primary storage when taking new (#2398)
When user creates a snapshot (manual or recurring), snapshot remains on
the primary storage, even if the snapshot is transferred successfully to
secondary storage. This is causing issues because XenServer can only hold
a limited number of snapshots in its VDI chain, preventing the user from
creating new snapshots after some time, when too many old snapshots are
present on the primary storage.
2018-02-06 20:09:40 +01:00
Rohit Yadav
fe44a0a2ab Merge branch 'origin/4.11' 2018-02-05 11:15:41 +01:00
Rohit Yadav
6ffbce6159 Updating pom.xml version numbers for release 4.11.0.1-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-02-05 11:13:50 +01:00
Rohit Yadav
ee16962272 Tagging release 4.11.0.0 on branch 4.11.
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJaaxt4AAoJEEhCSCEO49iEisEP/1gQr/tvWWbAn1S0Jwv7Tig9
 wmsOTOlci8m0J8R4wh34FlINhAUn8VJnayeJndeIiPJazVoOuvqWmmzlaZz3XIpk
 CsejVDo13XwgyG8KU89dIo/QOF2qexkcbT/Gzq1csTMtgbXST3uok8U3yHZ1qO8P
 y3jomeXRiZwM9YgRjwXnuTY1r02EhTgELjKSEweJFcte4TASX2ZQyfNjSAPDSjua
 Wkch8jQJyqyt2UNaVymryh/Z+owG//Y/7Fo+HrtlBaDuCMCMBfGcRzL/rMP3x6jb
 F0bHE4HsICMyraHvNZupbizWHdufPv0SupjrUahPcTziOa/Lic/0RDMkx9OskgzB
 OIdWPXtlynHrrDgVWbG5TAkPas3NLEiHauWIv51CWr5UaOTk3kW77lEB9qTk8vzX
 m2k8joQGBCyu2ID2jkROJLHgWBaVSk0ioK24LRqqZAbipRHofVrs+y4gqlqlN4Yx
 6nKQ6+mwMkTQK//8b4ltOVnHEBEDAmid3Phuce6Xe6F3Ga7eU6PwUG+mYGda+O6g
 8OOQmbKImA8086Df9JvoD7LyIgYrDK0PUraWYsVnh0OuvDKdbZVmUabZc07IydG6
 u5de8DLpvD3YprmjvexnqHmet+Xrs/HtNoRs+GoHlE7IBQ0OpP2ezEzCHWNm7KAC
 LllcEYVEWz+4Yi0rORBq
 =ctjX
 -----END PGP SIGNATURE-----

Merge tag '4.11.0.0' into 4.11

Tagging release 4.11.0.0 on branch 4.11.
2018-02-05 10:58:13 +01:00
Rafael Weingärtner
7f934c0e86 Formatting to make checkstyle happy 2018-02-01 11:41:56 -02:00
Rafael Weingärtner
5d545023fc [CLOUDSTACK-9338] ACS not accounting resources of VMs with custom service offering
ACS is accounting the resources properly when deploying VMs with custom service offerings. However, there are other methods (such as updateResourceCount) that do not execute the resource accounting properly, and these methods update the resource count for an account in the database. Therefore, if a user deploys VMs with custom service offerings, and later this user calls the “updateResourceCount” method, it (the method) will only account for VMs with normal service offerings, and update this as the number of resources used by the account. This will result in a smaller number of resources to be accounted for the given account than the real used value. The problem becomes worse because if the user starts to delete these VMs, it is possible to reach negative values of resources allocated (breaking all of the resource limiting for accounts). This is a very serious attack vector for public cloud providers!
2018-02-01 10:59:16 -02:00
Wido den Hollander
cbb4b79390 CLOUDSTACK-10225: Deprecate StringUtils in favor of Apache Commons (#2431)
* CLOUDSTACK-10225: Remove unused methods from StringUtils

Signed-off-by: Wido den Hollander <wido@widodh.nl>

* CLOUDSTACK-10225: Deprecate StringUtils.isNotBlank

Signed-off-by: Wido den Hollander <wido@widodh.nl>

* CLOUDSTACK-10225: Make isNotBlank a wrapper around Apache Commons

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2018-01-31 09:48:32 +01:00
Rafael Weingärtner
73251bf830 [CLOUDSTACK-10259] Missing float part of secondary storage data in listAccounts 2018-01-30 19:52:02 -02:00
Bruno P. Kinoshita
1acc8690c4 Fix exception message typos 2018-01-29 08:24:13 +00:00
Rohit Yadav
5dada1f7ed Updating pom.xml version numbers for release 4.11.0.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
4.11.0.0
2018-01-26 13:13:37 +01:00
Rohit Yadav
d6ce39b29b Merge branch '4.11'
- CLOUDSTACK-10239: Fallback to default provider if needed (#2430)
- CLOUDSTACK-10255: Fix agent logrotate (#2429)
2018-01-26 13:11:58 +01:00
dahn
6aadbc5219 CLOUDSTACK-10239: Fallback to default provider if needed (#2430)
Fallback to default provider if needed.
2018-01-26 13:03:11 +01:00
Frank Maximus
22d6718fe3 CLOUDSTACK-10255: Fix agent logrotate (#2429)
Renamed cloudstack-agent.logrotate to cloudstack-agent.logrotate.in,
so Ant will run the filterchain while copying.
This made the ant run copy block of cloudstack-agent.logrotate unnecessary,
so this is removed.
2018-01-24 23:35:27 +01:00
Rohit Yadav
bc1b5fb98f Merge branch '4.11' 2018-01-24 13:11:55 +01:00
Rohit Yadav
170b6ce20d
CLOUDSTACK-10236: Enable dynamic roles for missing props file (#2426)
Automate dynamic roles migration for missing props file

- In case commands.properties file is missing, enables dynamic roles.
- Adds a new -D or --default flag to migrate-dynamicroles.py script
  to simply update the global setting and use the default role-rule
  permissions.
- Add warning message, ask admins to move to dynamic roles during upgrade

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-01-24 13:11:08 +01:00