31261 Commits

Author SHA1 Message Date
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
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
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
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
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
Rohit Yadav
61a5a29705
CLOUDSTACK-10252: Delete dnsmasq leases file on restart (#2427)
Delete dnsmasq's leases file when dnsmasq is restarted to avoid it
use old ip-mac-address-vm mapping leases.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-01-24 11:09:45 +01:00
Wido den Hollander
f80f00ebcb CLOUDSTACK-10242: Properly parse incoming rules to Sec Group (#2418)
With merge of PR #2028 the separator for lines to the Security Group
Python script changed from : to ; to support IPv6 addresses.

This broke certain situations where rules were parsed improperly. This
commit fixes the issue.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-01-23 20:21:49 +01:00
Frank Maximus
3b23d5af74 CLOUDSTACK-10245: Fix password server regression (#2419)
In case of isolated, both self.config.is_vpc() and self.config.is_router() are false,
but self.config.is_dhcp() is true.
Moved the password server logic to the `if has_metadata` block,
as this is valid for all 3 systemvm types.
2018-01-23 17:20:03 +01:00
Rafael Weingärtner
c591c5ad3e CLOUDSTACK-10248: Fix errors that appeared after #2283 (#2417)
This fixes move refactoring error introduced in #2283 
For instance, the class DatadiskTO is supposed to be in com.cloud.agent.api.to package. However, the folder structure it was placed in is com.cloud.agent.api.api.to.

Skip tests for cloud-plugin-hypervisor-ovm3:
For some unknown reason, there are quite a lot of broken test cases for cloud-plugin-hypervisor-ovm3. They might have appeared after some dependency upgrade and was overlooked by the person updating them. I checked them to see if they could be fixed, but these tests are not developed in a clear and clean manner. On top of that, we do not see (at least I) people using OVM3-hypervisor with ACS. Therefore, I decided to skip them.

Identention corrected to use spaces instead of tabs in XML files
2018-01-23 12:19:36 +01:00
Rohit Yadav
7e39961f22 Merge branch '4.11'
- CLOUDSTACK-10244: Cache whether to migrate storage

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-01-22 09:05:26 +01:00
Mike Tutkowski
2ca264ca4d CLOUDSTACK-10244: Cache whether to migrate storage (#2416)
KVM online storage migration fails, this fixes use of whether to migrate storage using a cached variable.
2018-01-21 15:49:54 +05:30
Rohit Yadav
86b0dd8273 Merge branch '4.11' 2018-01-20 03:21:16 +05:30
dahn
5eb09565b3 CLOUDSTACK-10117: Allow scoped setting to have nullable values (#2413)
Allows scope setting for domain_details to have nullable values.
2018-01-20 03:20:35 +05:30
Marc-Aurèle Brothier
893a88d225 CLOUDSTACK-10105: Use maven standard project structure in all projects (#2283)
Remove maven standard module (which only a few were using) and get ride of maven customization for the projects structure.

- moved all directories to src/main/java, src/main/resources, src/main/scripts, src/test/java, src/test/resources
- grep scan to search for src/com and src/org left over
- grep for <project>/scripts to fix pom.xml configuration
- remove custom <build> configuration in pom.xml

Signed-off-by: Marc-Aurèle Brothier <m@brothier.org>
2018-01-20 03:19:27 +05:30
Rohit Yadav
f7f14bfcc5 Merge branch '4.11' 2018-01-19 13:46:58 +05:30
Frank Maximus
cfff78d9a1 CLOUDSTACK-10233: Use namespace in Libvirt domain metadata. (#2410)
The documentation of Libvirt specifies the requirement of using an XML namespace,
when having metadata in the Domain XML. The Nuage extenstion metadata was not
adhering to this specification, and the lastest Libvirt version ignores it in that case.
2018-01-19 13:44:16 +05:30