138 Commits

Author SHA1 Message Date
Rohit Yadav
d19629a115 CLOUDSTACK-10013: Fixes based on code review and test failures
This includes test related fixes and code review fixes based on
reviews from @rafaelweingartner, @marcaurele, @wido and @DaanHoogland.

This also includes VMware disk-resize limitation bug fix based on comments
from @sateesh-chodapuneedi and @priyankparihar.

This also includes the final changes to systemvmtemplate and fixes to
code based on issues found via test failures.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-12-23 17:51:42 +05:30
Rohit Yadav
15b11a3b27 CLOUDSTACK-10013: Fix VMware related issues and fix misc tests
This fixes test failures around VMware with the new systemvmtemplate.
In addition:

- Does not skip rVR related test cases for VMware
- Removes rc.local
- Processes unprocessed cmd_line.json
- Fixed NPEs around VMware tests/code
- On VMware, use udevadm to reconfigure nic/mac address than rebooting
- Fix proper acpi shutdown script for faster systemvm shutdowns
- Give at least 256MB of swap for VRs to avoid OOM on VMware
- Fixes smoke tests for environment related failures

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-12-23 09:22:44 +05:30
Rohit Yadav
eda3b35bfa CLOUDSTACK-10012: Migrate to Embedded Jetty
- Migrate to embedded Jetty server.
- Improve ServerDaemon implementation.
- Introduce a new server.properties file for easier configuration.
- Have a single /etc/default/cloudstack-management to configure env.
- Reduce shaded jar file, removing unnecessary dependencies.
- Upgrade to Spring 5.x, upgrade several jar dependencies.
- Does not shade and include mysql-connector, used from classpath instead.
- Upgrade and use bountcastle as a separate un-shaded jar dependency.
- Remove tomcat related configuration and files.
- Have both embedded UI assets in uber jar and separate webapp directory.
- Refactor systemd and init scripts, cleanup packaging.
- Made cloudstack-setup-databases faster, using `urandom`.
- Remove unmaintained distro packagings.
- Moves creation and usage of server keystore in CA manager, this
  deprecates the need to create/store cloud.jks in conf folder and
  the db.cloud.keyStorePassphrase in db.properties file. This also
  remove the need of the --keystore-passphrase in the
  cloudstack-setup-encryption script.
- GZip contents dynamically in embedded Jetty

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-11-03 23:57:25 +05:30
Sigert Goeminne
9c7cd8c248 CLOUDSTACK-10081: CloudUtils getDevInfo function will now return "bridge" instead of "dev" when the name of a ovs bridge is passed. 2017-10-30 11:53:04 +01:00
Rohit Yadav
579c7213a7 cloudutils: Fix regression from PR#2033
This fixes regression from PR #2033 which breaks cloudstack deployment
for centos6/7.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-04-19 12:54:09 +05:30
Wei Zhou
4a77a79949 CLOUDSTACK-9462: Build packages on Ubuntu 14.04/16.04 and support tomcat6/tomcat7
Changes
(1) add systemd support in debian/control and debian/rules for 16.04
(2) add python-setuptools in Build-Depends in debian/control
(3) seperate cloudstack-management.service and cloudstack-management.default for CentOS7 and Ubuntu 16.04
(4) add server7-ssl.xml and server7-nonssl.xml in management installation
(5) link /usr/share/cloudstack-management/lib and /usr/share/cloudstack-management/bin to correct path (tomcat6 or tomcat7)
(6) link /etc/cloudstack/management/server.xml to correct file path (server-nonssl.xml or server7-nonssl.xml)
(7) remove *.zip from .gitignore to avoid build error caused by missing /vhds/test.vhd.zip

Instruction
(1) build packages on Ubuntu 16.04: dpkg-buildpackage -uc -us
    Output on Ubuntu 16.04:
-rw-r--r-- 1 root root      4090 Feb 17 10:12 cloudstack_4.10.0.0-SNAPSHOT_amd64.changes
-rw-r--r-- 1 root root      1235 Feb 17 09:53 cloudstack_4.10.0.0-SNAPSHOT.dsc
-rw-r--r-- 1 root root   8018248 Feb 17 09:53 cloudstack_4.10.0.0-SNAPSHOT.tar.xz
-rw-r--r-- 1 root root  91868746 Feb 17 10:11 cloudstack-agent_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root     52882 Feb 17 10:12 cloudstack-cli_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root  98556216 Feb 17 10:08 cloudstack-common_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root     52864 Feb 17 10:12 cloudstack-docs_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root    585434 Feb 17 10:12 cloudstack-integration-tests_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root 323459934 Feb 17 10:10 cloudstack-management_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root    442656 Feb 17 10:12 cloudstack-marvin_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root  87037576 Feb 17 10:12 cloudstack-usage_4.10.0.0-SNAPSHOT_all.deb

(2) setup tomcat6/tomcat7 on management server:
    tomcat6: cloudstack-setup-management --tomcat6
    tomcat7: cloudstack-setup-management --tomcat7

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-04-07 18:41:24 +05:30
Pall Helgason
6b2eb3b99a CLOUDSTACK-9645: Moving stop of management in config inside if statement.
It will only run the stop command when --no-start is specified.
2016-12-01 12:59:37 +00:00
Paul Angus
11e3582fdf Remove extraneous log directory and add catalina.out log rotation 2016-05-12 08:41:39 +01:00
Wido den Hollander
92e3ba2053 CLOUDSTACK-8818: Use MySQL native connector with Python
MySQLdb has been deprecated and is also not supported in Python 3.

mysql.connector is a connector written in Python which talks the
native MySQL protocol without any external code.

https://dev.mysql.com/doc/connector-python/en/
2016-05-04 23:28:52 +02:00
Remi Bergsma
e9de865989 Merge pull request #1162 from greenqloud/pr-no-start
Add support for not (re)starting server after cloud-setup-management.This adds an option to the cloud-setup-management script to not start the management server after a successful configuration of it.

The primary motivation for this is to avoid circular dependency issues on systems that use systemd. When calling cloud-setup-management from a unit with a Before= directive on a service depending on
cloudstack-management, the process will deadlock because /usr/bin/service will delegate to systemd, which is waiting for the Before service to start.

Executing the cloud-setup-management script with this new `--no-start` option will simply leave the management server stopped after a successful configuration. systemd can then be bypassed with `export _SYSTEMCTL_SKIP_REDIRECT=1` and using the init.d script.

* pr/1162:
  Add support for not (re)starting server after cloud-setup-management.

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-07 21:06:19 +01:00
jeff
e0e65f5cd6 Add support for not (re)starting server after cloud-setup-management.
This adds an option to the cloud-setup-management script to not start
the management server after a successful configuration of it. The
primary motivation for this is to avoid circular dependency issues on
systems that use systemd. When calling cloud-setup-management from a
unit with a Before= directive on a service depending on
cloudstack-management, the process will deadlock because
/usr/bin/service will delegate to systemd, which is waiting for the
Before service to start.
2015-12-04 09:58:39 +00:00
Boris Schrijver
e2fc270480 CLOUDSTACK-9078: Gave scripts executable permissions. 2015-11-23 00:25:24 +01:00
Boris Schrijver
1e73f667c9 CLOUDSTACK-9076: Changed ownership of directory /var/lib/cloudstack to cloud. 2015-11-23 00:25:14 +01:00
Remi Bergsma
ee639cffe4 Merge pull request #1052 from davidamorimfaria/centos7-packaging
CLOUDSTACK-9049: fix Centos7 with Tomcat7 packaging and python libsCLOUDSTACK-9049: Fix Centos7 with Tomcat7 packaging and python libs

* pr/1052:
  CLOUDSTACK-9049: fix Centos7 with Tomcat7 packaging and python libs * adjust library to support tomcat7 config files * adjust centos7 spec to use tomcat7 config files from deployment * add option to use tomcat7 files in management server setup
  reorder content to match original

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-10 13:30:55 +01:00
David Amorim Faria
3c4a24cf2c CLOUDSTACK-9049: fix Centos7 with Tomcat7 packaging and python libs
* adjust library to support tomcat7 config files
* adjust centos7 spec to use tomcat7 config files from deployment
* add option to use tomcat7 files in management server setup
2015-11-10 11:55:19 +01:00
Remi Bergsma
6a1b886951 Merge pull request #1039 from borisroman/CLOUDSTACK-9039
CLOUDSTACK-9039: Fix paths for logging Ubuntu ManagementFix paths for logging Ubuntu Management.

How to test:
Install via DEB packages...

* pr/1039:
  CLOUDSTACK-9039: Fix paths for logging Ubuntu Management.

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-09 17:33:29 +01:00
Remi Bergsma
ca860348dc Merge pull request #1033 from Carles-Figuerola/centos-7-redhat-release
CLOUDSTACK-9029: Proper support to identify CentOS 7 version numberhttps://issues.apache.org/jira/browse/CLOUDSTACK-9029

* pr/1033:
  CLOUDSTACK-9029: Proper support to identify CentOS 7 version number

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-09 16:54:38 +01:00
Boris Schrijver
acd49d801b CLOUDSTACK-9039: Fix paths for logging Ubuntu Management. 2015-11-09 15:50:18 +01:00
Carles Figuerola
3ce420c367 CLOUDSTACK-9029: Proper support to identify CentOS 7 version number 2015-11-04 11:21:47 -06:00
Rohit Yadav
1e8d39b12e CLOUDSTACK-8999: Don't override resource if provided by agent.properties
If a custom resource (kvm/libvirt implementation) is defined in agent.properties
don't override with the default, but check and fallback to the default if
resource property not defined

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 536a8b22c8865dc94281bce6267930a63e03ab77)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-10-28 10:56:36 +05:30
Remi Bergsma
0a320c18d4 CLOUDSTACK-8443: detect CentOS 7.x as RHEL 7 alike 2015-08-24 15:51:14 +02:00
Remi Bergsma
b29ffa2cfe CLOUDSTACK-8443: mention the correct logfile 2015-08-24 15:51:14 +02:00
Remi Bergsma
87fdb521f0 CLOUDSTACK-8443: don't try to fix co-mounted cgroups
This setting works on CentOS 6 / RHEL 6 but does nothing, as
"cpu" cgroup is not mounted. On CentOS 7 / RHEL 7 systemd does
mount cgroups and "cpu" is co-mounted with "cpuacc". Hence, if
we specify "cpu" then this results in an error because it can
only use them both, or none.

By removing the setting, we rely on the default of qemu, which
is:
cgroup_controllers = ["cpu", "devices", "memory", "blkio", "cpuacct", "net_cls"]

Only if they are really mounted, they will be used. So, this will
work on both version 6 and 7.

The 'fix script' didn't work well, as after a reboot you'd still have qemu
throwing errors. Now we can handle the co-mountedcgroups.
2015-08-24 15:49:40 +02:00
Rafael da Fonseca
870e1898eb Use same sudoers config for all distros Cleanup buggy code for sudoers file editing
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #332
2015-06-19 16:00:57 +02:00
Rafael da Fonseca
1958a8e9c1 Cleanup awsapi leftovers
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #328
2015-05-29 19:15:51 +02:00
Vincent Bernat
2401eb927b CLOUDSTACK-7633: fix "Provides" in most LSB headers
In init.d scripts, the LSB header may specify what kind of service is
provided by an init script. If spaces are used, this means the init
script is providing several boot facilities. We fix that by using an
hyphen.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-25 16:56:53 +02:00
Kishan Kavala
983a3b80e2 CLOUDSTACK-7568, CLOUDSTACK-7569: Use systemctl for managing services in RHEL7. chkconfig --del doesn't work in RHEL7. 2014-09-17 17:55:07 +05:30
Kishan Kavala
75d01971e8 CLOUDSTACK-7546: cloudstack-setup-agent considers distro as RHEL5 if no conditions match. Add check to identify RHEL7 distro and consider it as RHEL6. If there is anything specific required for RHEL7, it can be added later 2014-09-16 21:03:01 +05:30
Damodar
7ea7deded0 CLOUDSTACK-7106 : RPM build failing with RHEL7 Reviewed By : Rayees
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-08-26 11:04:48 +05:30
Erik Weber
451e2ab851 Adding keytool to the list of sudo commands for cloud user to allow certificate creation during startup
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2014-08-01 17:19:46 +02:00
Jayapal
79fcbd4a59 CLOUDSTACK-7213: fixed continuing cloud-setup-database if there is no selinux 2014-08-01 15:54:17 +05:30
Kishan Kavala
89854de18d CLOUDSTACK-6931: Set hypervisor.type in agent.properties using cloudstack-setup -t option. Default is kvm. 2014-06-19 11:31:23 +05:30
ynojima
ab89eb106f CLOUDSTACK-6816 bugfix: cloudstack-setup-management make /root directory's permission 0777 improperly 2014-05-31 12:54:09 -06:00
Marcus Sorensen
a4d3ec476f CLOUDSTACK-6220: Take 2, Fix cloudstack init scripts so that they
don't use fully qualified path as script name. Fix for
    commit 9dd57c22b02afcddb1d6c8ddc3e1b578961454e3
2014-03-10 16:11:52 -06:00
Marcus Sorensen
d033ca486b CLOUDSTACK-6220: Fix cloudstack init scripts so that they
don't use fully qualified path as script name. Fix for
commit 9dd57c22b02afcddb1d6c8ddc3e1b578961454e3
2014-03-10 15:34:55 -06:00
John Kinsella
9dd57c22b0 CLOUDSTACK-6129: removing hard-coded script names
Replacing whatami with $0 which is how UNIX shell scripts should get the
script's name.

BUG-ID: CLOUDSTACK-6129
Bugfix-for:
Reviewed-by:
Reported-by:
Signed-off-by: John Kinsella <jlk@stratosec.co> 1392660036 -0800
2014-02-17 10:00:36 -08:00
Marcus Sorensen
c2e2f6ce63 relax KVM agent setup to allow non-bridge traffic labels
(guest bridges are created on physical device, no need for bridge traffic label)
2013-11-01 18:16:54 -06:00
John Kinsella
45e4d4fc3b Summary: Updated sudoers approved commands for cloud user
Detail: Previously the cloud user has full password-less sudo access.
This commit changes that to only allow access to a specific list of
commands. Been tested in production on ACS 4.0 and 4.2 mangement servers.

BUG-ID: CLOUDSTACK-967
Bugfix-for:
Reviewed-by:
Reported-by:
Signed-off-by: John Kinsella <jlk@stratosec.co> 1382560936 -0700
2013-10-23 13:42:16 -07:00
Edison Su
6489b3bf61 turn off nfs cache 2013-09-25 16:16:25 -07:00
Edison Su
7b4f846220 CLOUDSTACK-4405: add a tool: cloudstack-agent-upgrade to upgrade bridge name on kvm host
(cherry picked from commit 0ef6084d2c838a78eda29d258b1af98df96451b3)

Signed-off-by: Wei Zhou <w.zhou@leaseweb.com>
2013-09-24 09:53:05 +02:00
Hugo Trippaers
fde6637f90 Use the blacklist in modprobe as the bridge module might be blacklisted by the openvswitch installation. 2013-06-19 20:59:02 +02:00
Hiroaki KAWAI
a16b707250 CLOUDSTACK-2327: make cloud-setup-agent ovs aware
Ovs brcompat will be obsolete, so if network.bridge.type was
set to openvswitch, we'll use ovs command explicitly.

Signed-off-by: Hiroaki KAWAI <kawai@stratosphere.co.jp>
2013-05-27 16:30:32 +09:00
Hiroaki KAWAI
6ade5da25f CLOUDSTACK-1642: Add support CentOS 6.4
Fix the test string to match against "CentOS 6.x"
2013-03-26 13:16:37 +09:00
Pradeep
c305e3c5a1 BUG-ID: CLOUDSTACK-1713, CLOUDSTACK-1719
Summary: EC2 REST API: AWS APIs are not getting translated on the CloudStack Management Server and AWS API Installation Problems.
This fixes the above two defects and other packaging related issues.

Signed-off-by: Pradeep <pradeep.soundararajan@citrix.com>
2013-03-22 15:15:36 +00:00
Noa Resare
fe9df2186b Have cloud-setup-* tools detect Debian
To minimize this change, treat Debian as Ubuntu for now.

Reviewed-by: Wido (https://reviews.apache.org/r/9310)
2013-02-25 12:32:25 +05:30
Marcus Sorensen
8652e5f87e Summary: Fix hanging references to /var/lib/cloud, changed to /var/cloudstack
BUG-ID: CLOUDSTACK-1201
BUG-ID: CLOUDSTACK-1196
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1360786749 -0700
2013-02-13 13:22:28 -07:00
Pradeep Soundararajan
a9955f155a Summary: changed the path from cloud to cloudstack.
The change in package script allowed us to create proper tar under rpmbuild/SOURCES directory

The change in the path enabled us to launch the management server properly.

Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2013-02-07 13:45:30 +01:00
Edison Su
0b60c0d3c9 CLOUDSTACK-995: fix failed to detect centos 6.2 2013-01-17 11:05:03 -08:00
Noa Resare
127867cc99 Improved handling of unknown OS, Distribution
Introduce UnknownSystemExcpetion to indicate that the system is
is unknonwn. Catch said exception in cloud-setup-management,
print an error and exit.

CLOUDSTACK-966: Improve error reporting when running on unknown OS / version

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-01-13 15:08:04 +05:30
frank
23495c7e26 CloudStack CS-15455 There are no iptable rules configured to open awsapi port (7080) for external world.
resolved fixed

reviewed-by:edison
2012-10-12 14:13:13 -07:00