Commit Graph

31269 Commits

Author SHA1 Message Date
Rohit Yadav 9cf1532f0e
debian: remove old usage jars during upgrade (#2552)
This removes old cloudstack-usage jars during upgrade as part of
the pre-install step of cloudstack-usage deb package.

This fixes #2542.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-04-09 17:21:06 +05:30
dahn cff4032f00
CLOUDSTACK-10287 package require open jdk 1.8 (#2519) 2018-04-02 22:01:41 +00:00
dahn 23ae6762bd
make Broadcast- and IsolationURI visible to admin (#2520) 2018-04-02 21:55:18 +00:00
Rohit Yadav 43f2a28d65 Merge branch '4.10' into 4.11 2018-03-30 16:17:37 +05:30
Rohit Yadav 5dcc3c2c54 Merge branch '4.9' into 4.10
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-30 16:16:11 +05:30
Rohit Yadav 78abb353ac Tagging release 4.9.3.1 on branch robot-tls-fix.
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJas0g9AAoJEEhCSCEO49iEUzIP/3cBrkhQuaGTNA5NEsNuT3ca
 BI6bUkH5Jm0LWGvCxRvg4ZwZgzAO7KUb1CzEqlG/F+YC6PHUMgi+41wcPKdIjKGB
 VXHkmVkHGNUCjXG8YO7cBODA1VsqyFa2NUTe4kJKIlJ6SBJ7amUFEEMgH5nk5oIO
 LlNg9LetNqlTpBTkKVUkkOKVou+nLSoB46SnQ+mmlaT1uwIK8JpCeZQ5KmNsutnX
 mWsiu7T50ItJYrN0ZxEIhDX/7WZhTK1ogkkorNpRbSAHjhjwsaJrhLOdmuXAFHur
 R0zMSshU9U/nOuaOLwSnxmJirKyhuop++ZsOSLKgzHE2cj0bOfdWCdzPapJTpFls
 /DP96Pahu+GyelS2buBhfNDnOL2kdtcyXpwBxGxG3rXnd6bSL3rbLbBhgwQF5XeU
 XEVl0Bwyydo9kycefxrq0DY5I73zBRE3f/6fs+Xz2UNqUWI6QJDL6e/s0IXhZBs+
 JwGrcB1QTDRi3H6SgVM1cb1Ih7d4dIyFgpPSK6EUC9jbl3y9KvlnhiXU3Z9M0lpo
 WDFkeiy0V5MEMR6EusC/b1EeJCFicmnj1azlbwUVaRyUGgY6l8DarwwBHX23fnyW
 exY9STXjNrWWRI3FSTiWorW6i+c+xgZ41uxNDSc2hUejCmDhrpV7TLypRLT4hvYp
 95QU/OSZCw81IVmw1uOD
 =Ql9D
 -----END PGP SIGNATURE-----

Merge tag '4.9.3.1' into 4.9

Tagging release 4.9.3.1 on branch robot-tls-fix.
2018-03-30 16:14:17 +05:30
Mike Tutkowski e68f5cea67 Only use the host if its Resource State is Enabled. (#2512) 2018-03-29 17:43:22 +00:00
ernjvr 7647e104b2 CLOUDSTACK-10278 idempotent column addition (#2449)
* CLOUDSTACK-10278 - WIP: need to test this script before create a pull request

* CLOUDSTACK-10278 - added more idempotent stored procs and moved all lines, that end with a semicolon in existing proc, onto one line because com/cloud/utils/db/ScriptRunner.java executes the sql as soon as it reads in line with a semicolon delimeter at the end.

* CLOUDSTACK-10278 - changed more sql statements to call idempotent stored procs

* CLOUDSTACK-10278 - WIP: need to test this script before create a pull request

* CLOUDSTACK-10278 - added more idempotent stored procs and moved all lines, that end with a semicolon in existing proc, onto one line because com/cloud/utils/db/ScriptRunner.java executes the sql as soon as it reads in line with a semicolon delimeter at the end.

* CLOUDSTACK-10278 - changed more sql statements to call idempotent stored procs
2018-03-28 11:19:08 +00:00
Rohit Yadav 986ecfa7e9
CLOUDSTACK-10341: Reduce systemvmtemplate size, install nftables (#2506)
This reduces systemvmtemplate size by 600MB and installs nftables,
updates iptables. This also fixes a failing smoke test.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-28 13:11:51 +05:30
Rohit Yadav 48e6989da4
CLOUDSTACK-10227: Fix mkdir path for centos rpms (#2513)
This fixes the mkdir path `/usr/bin` for el6/7 rpms.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-27 22:52:37 +05:30
Khosrow Moossavi 535e6153cc CLOUDSTACK-10232: SystemVMs and VR to run as HVM on XenServer (#2465)
Publishing boot args both to grub and xenstore-data and let
cloud-early-config decides if the VM is in PV or HVM mode
to read from correct source.
2018-03-27 15:48:37 +05:30
Rohit Yadav c4cc679c3b
CLOUDSTACK-10319: Allow TLSv1, v1.1 for XenServer, Vmware (#2507)
This reverts changes from #2480, instead moves TLS settings to
java ciphers settings config file. It should be sufficient to enforce
TLS v1.2 on public facing CloudStack services:
- CloudStack webserver (Jetty based)
- Apache2 for secondary storage VM
- CPVM HTTPs server

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-26 14:16:49 +05:30
René Moser c8dcc64b65 CLOUDSTACK-10341: VR minor fixes to systemvmtemplate (#2468)
- Fixes rsyslog: fix config error in rsylslog.conf

Feb 26 08:09:54 r-413-VM liblogging-stdlog[19754]: action '*' treated as ':omusrmsg:*' - please use ':omusrmsg:*' syntax instead, '*' will not be supported in the future [v8.24.0 try http://www.rsyslog.com/e/2184 ]
Feb 26 08:09:54 r-413-VM liblogging-stdlog[19754]: error during parsing file /etc/rsyslog.conf, on or before line 95: warnings occured in file '/etc/rsyslog.conf' around line 95 [v8.24.0 try http://www.rsyslog.com/e/2207 ]

- Run apache2 only after cloud-postinit

- Increase /run size for VR with 256M RAM

root@r-395-VM:~# systemctl daemon-reload
Failed to reload daemon: Refusing to reload, not enough space available on /run/systemd. Currently, 15.8M are free, but a safety buffer of 16.0M is enforced.

tmpfs            23M  6.5M   16M  29% /run
2018-03-23 11:52:29 +05:30
Rohit Yadav 2a068696f8
CLOUDSTACK-10340: Add setter to hypervisorType in VMInstanceVO (#2504)
This adds a missing setter to set hypervisorType in VMInstanceVO.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-23 11:48:13 +05:30
Rohit Yadav 1ee66e0165 Updating pom.xml version numbers for release 4.9.3.1
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-22 11:37:50 +05:30
Rohit Yadav d9fb660df9 CLOUDSTACK-10322: Fix Robot Attack upgrade bountycastle
This upgrades bountycasle version v1.59 to fix for robot attack.
In addition, this disables TLSv1.0 as it is deprecated both in
use by management server, agents and in apache2 configs.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-22 11:10:43 +05:30
Nicolas Vazquez 6a75423779 CLOUDSTACK-10231: Asserted fixes for Direct Download on KVM (#2408)
Several fixes addressed:

- Dettach ISO fails when trying to detach a direct download ISO
- Fix for metalink support on SSVM agents (this closes CLOUDSTACK-10238)
- Reinstall VM from bypassed registered template (this closes CLOUDSTACK-10250)
- Fix upload certificate error message even though operation was successful
- Fix metalink download, checksum retry logic and metalink SSVM downloader
2018-03-20 19:24:46 +05:30
Rohit Yadav 1ad04cbc9b
CLOUDSTACK-10330: Add PULL_REQUEST_TEMPLATE (#2489)
This adds a standard pull request template.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-19 11:40:57 +05:30
Rohit Yadav 30175d6879
CLOUDSTACK-10132: Extend support for management servers LB for agents (#2469)
The new CA framework introduced basic support for comma-separated
list of management servers for agent, which makes an external LB
unnecessary.

This extends that feature to implement LB sorting algorithms that
sorts the management server list before they are sent to the agents.
This adds a central intelligence in the management server and adds
additional enhancements to Agent class to be algorithm aware and
have a background mechanism to check/fallback to preferred management
server (assumed as the first in the list). This is support for any
indirect agent such as the KVM, CPVM and SSVM agent, and would
provide support for management server host migration during upgrade
(when instead of in-place, new hosts are used to setup new mgmt server).

This FR introduces two new global settings:

- `indirect.agent.lb.algorithm`: The algorithm for the indirect agent LB.
- `indirect.agent.lb.check.interval`: The preferred host check interval
  for the agent's background task that checks and switches to agent's
  preferred host.

The indirect.agent.lb.algorithm supports following algorithm options:

- static: use the list as provided.
- roundrobin: evenly spreads hosts across management servers based on
  host's id.
- shuffle: (pseudo) randomly sorts the list (not recommended for production).

Any changes to the global settings - `indirect.agent.lb.algorithm` and
`host` does not require restarting of the mangement server(s) and the
agents. A message bus based system dynamically reacts to change in these
global settings and propagates them to all connected agents.

Comma-separated management server list is propagated to agents on
following cases:
- Addition of a host (including ssvm, cpvm systevms).
- Connection or reconnection by the agents to a management server.
- After admin changes the 'host' and/or the
  'indirect.agent.lb.algorithm' global settings.

On the agent side, the 'host' setting is saved in its properties file as:
`host=<comma separated addresses>@<algorithm name>`.

First the agent connects to the management server and sends its current
management server list, which is compared by the management server and
in case of failure a new/update list is sent for the agent to persist.

From the agent's perspective, the first address in the propagated list
will be considered the preferred host. A new background task can be
activated by configuring the `indirect.agent.lb.check.interval` which is
a cluster level global setting from CloudStack and admins can also
override this by configuring the 'host.lb.check.interval' in the
`agent.properties` file.

Every time agent gets a ms-host list and the algorithm, the host specific
background check interval is also sent and it dynamically reconfigures
the background task without need to restart agents.

Note: The 'static' and 'roundrobin' algorithms, strictly checks for the
order as expected by them, however, the 'shuffle' algorithm just checks
for content and not the order of the comma separate ms host addresses.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-15 16:34:03 +05:30
Rohit Yadav ab0bce2a1b
CLOUDSTACK-10296: Find time different from last timestamp (#2458)
This fixes a difference issue in rVR heartbeat check script raised
recently on dev@.
Reduce logging to avoid logging to fill ramdisk
Make checkrouter return fault state when keepalived is not running

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-15 16:32:18 +05:30
Nicolas Vazquez 74db647dbb CLOUDSTACK-10321: CPU Cap for KVM (#2482) 2018-03-14 18:21:24 +00:00
Raf Smeets 19d6578732 CLOUDSTACK-10303 : Refactor test data to nuage_test_data.py runnable against simulator (#2483)
* Refactored nuage tests

Added simulator support for ConfigDrive
Allow all nuage tests to run against simulator
Refactored nuage tests to remove code duplication

* Move test data from test_data.py to nuage_test_data.py

Nuage test data is now contained in nuage_test_data.py instead of
test_data.py
Removed all nuage test data from nuage_test_data.py

* CLOUD-1252 fixed cleanup of vpc tier network

* Import libVSD into the codebase

* CLOUDSTACK-1253: Volumes are not expunged in simulator

* Fixed some merge issues in test_nuage_vsp_mngd_subnets test

* Implement GetVolumeStatsCommand in Simulator

* Add vspk as marvin nuagevsp dependency, after removing libVSD dependency

* correct libVSD files for license purposes

pep8 pyflakes compliant
2018-03-14 17:17:36 +05:30
Khosrow Moossavi 7112affe19 Bump the version of Debian net-installer to 9.4.0 (#2485) 2018-03-13 09:46:42 +01:00
Rohit Yadav da8cf8c370
CLOUDSTACK-10319: Prefer TLSv1.2, deprecate TLSv1.0,1.1 (#2480)
This deprecates and remove TLS 1.0 and 1.1 from preferred list of
protocols and keeps only TLSv1.2.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-12 11:43:59 +01:00
Rohit Yadav c0440e8124 CLOUDSTACK-10317: Fix SNAT rules for additional public nics (#2476)
* CLOUDSTACK-10317: Fix SNAT rules for additional public nics

This allows networks with additional public nics to have correct
SNAT iptables rules applied on configuration.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* update based on Wei's suggested change

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-08 10:01:36 +01:00
Nicolas Vazquez c0b920f740 CLOUDSTACK-10274: L2 network refused to be designed on VXLAN physical network (#2448)
L2 network refused to be designed on VXLAN physical network. Add fix for vxlan issue.
Add condition for L2 networks which do not allow specifying vlan.
2018-03-06 14:56:47 +01:00
Rafael Weingärtner 0bb20a7ed2
Merge pull request #2464 from resmo/fix/4.11/CLOUDSTACK-10299
[4.11] CLOUDSTACK-10299: UI: fix error in network listing in project mode
2018-02-27 12:04:57 -03:00
Rohit Yadav 5c2b8f80f0 CLOUDSTACK-10306: Upgrade to VMware 6.5 vim jar dependency (#2467)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-02-27 12:28:48 +01:00
Sigert Goeminne 3dfbcbc48a CLOUDSTACK-10298: fix for recreation of an earlier deleted Nuage managed network (#2460)
* CLOUDSTACK-10298: Recreation of an earlier deleted Nuage managed isolated or vpc tier network fails

Added negative tests for feature vsd managed subnets
Added fixes for reacreation of an earlier deleted Nuage managed network
Updated Nuage Vsp CloudStack client to 1.0.8
Co-authored by: Sigert Goeminne <sigert.goeminne@nuagenetworks.net>

* removed commented code as per review comment
2018-02-27 12:25:15 +01:00
Rohit Yadav 0ece15f86e Updating pom.xml version numbers for release 4.11.1.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-02-26 16:57:48 +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 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
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 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
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
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 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
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 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 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
Rohit Yadav 5dada1f7ed Updating pom.xml version numbers for release 4.11.0.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-01-26 13:13:37 +01:00