From 310e99087ff8f46ac903f2a28169f3ffe2d13ebd Mon Sep 17 00:00:00 2001 From: Edison Su Date: Mon, 25 Feb 2013 10:45:04 -0800 Subject: [PATCH 1/4] CLOUDSTACK-1380: add db upgrade for vm_template, in 4.1 to 4.2 upgrade procedure --- .../src/com/cloud/upgrade/dao/Upgrade410to420.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/src/com/cloud/upgrade/dao/Upgrade410to420.java b/server/src/com/cloud/upgrade/dao/Upgrade410to420.java index a0592579a43..9000e15f7aa 100644 --- a/server/src/com/cloud/upgrade/dao/Upgrade410to420.java +++ b/server/src/com/cloud/upgrade/dao/Upgrade410to420.java @@ -59,6 +59,20 @@ public class Upgrade410to420 implements DbUpgrade { @Override public void performDataMigration(Connection conn) { + PreparedStatement sql = null; + try { + sql = conn.prepareStatement("update vm_template set image_data_store_id = 1 where type = 'SYSTEM' or type = 'BUILTIN'"); + sql.executeUpdate(); + } catch (SQLException e) { + throw new CloudRuntimeException("Failed to upgrade vm template data store uuid: " + e.toString()); + } finally { + if (sql != null) { + try { + sql.close(); + } catch (SQLException e) { + } + } + } } @Override From bf9ff8c4f62047d3b2272b8242acda71034519e1 Mon Sep 17 00:00:00 2001 From: radhikap Date: Mon, 25 Feb 2013 16:49:39 +0530 Subject: [PATCH 2/4] cloudstack-462 Signed-off-by: radhikap Signed-off-by: Sebastien Goasguen --- .../management-server-install-client.xml | 11 ++-- .../management-server-install-db-local.xml | 60 +++++++++++++++---- 2 files changed, 53 insertions(+), 18 deletions(-) diff --git a/docs/en-US/management-server-install-client.xml b/docs/en-US/management-server-install-client.xml index 7e81ec735fc..899e97c19bc 100644 --- a/docs/en-US/management-server-install-client.xml +++ b/docs/en-US/management-server-install-client.xml @@ -1,5 +1,5 @@ - %BOOK_ENTITIES; ]> @@ -11,9 +11,7 @@ to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -33,13 +31,14 @@ packages will depend on everything you need to run the Management server.
Downloading vhd-util - This procedure is required only for installations where XenServer is installed on the hypervisor hosts. + This procedure is required only for installations where XenServer is installed on the + hypervisor hosts. Before setting up the Management Server, download vhd-util from vhd-util. If the Management Server is RHEL or CentOS, copy vhd-util to /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver. If the Management Server is Ubuntu, copy vhd-util to - /usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/vhd-util. + /usr/lib/cloud/common/scripts/vm/hypervisor/xenserver.
Install on CentOS/RHEL @@ -50,4 +49,4 @@ Install on Ubuntu apt-get install cloud-client
- \ No newline at end of file + diff --git a/docs/en-US/management-server-install-db-local.xml b/docs/en-US/management-server-install-db-local.xml index 242249040b1..00ea93b1dcf 100644 --- a/docs/en-US/management-server-install-db-local.xml +++ b/docs/en-US/management-server-install-db-local.xml @@ -11,9 +11,7 @@ to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -29,19 +27,23 @@ MySQL. See . - Install MySQL from the package repository from your distribution: + Install MySQL from the package repository of your distribution: On RHEL or CentOS: yum install mysql-server On Ubuntu: apt-get install mysql-server - Edit the MySQL configuration (/etc/my.cnf or /etc/mysql/my.cnf, depending on your OS) - and insert the following lines in the [mysqld] section. You can put these lines below the - datadir line. The max_connections parameter should be set to 350 multiplied by the number of - Management Servers you are deploying. This example assumes one Management Server. + Open the MySQL configuration file. The configuration file is /etc/my.cnf or + /etc/mysql/my.cnf, depending on your OS. + + + Insert the following lines in the [mysqld] section. + You can put these lines below the datadir line. The max_connections parameter should be + set to 350 multiplied by the number of Management Servers you are deploying. This example + assumes one Management Server. - On Ubuntu, you can also create a file /etc/mysql/conf.d/cloudstack.cnf and add these + On Ubuntu, you can also create a file /etc/mysql/conf.d/cloudstack.cnf and add these directives there. Don't forget to add [mysqld] on the first line of the file. innodb_rollback_on_timeout=1 @@ -68,6 +70,40 @@ binlog-format = 'ROW' questions. mysql_secure_installation + + &PRODUCT; can be blocked by security mechanisms, such as SELinux. Disable SELinux to + ensure + that the Agent has all the required permissions. + Configure SELinux (RHEL and CentOS): + + + Check whether SELinux is installed on your machine. If not, you can skip this + section. + In RHEL or CentOS, SELinux is installed and enabled by default. You can verify this + with: + $ rpm -qa | grep selinux + + + Set the SELINUX variable in /etc/selinux/config to + "permissive". This ensures that the permissive setting will be maintained after a system + reboot. + In RHEL or CentOS: + vi /etc/selinux/config + Change the following line + SELINUX=enforcing + to this: + SELINUX=permissive + + + Set SELinux to permissive starting immediately, without requiring a system + reboot. + $ setenforce permissive + + + + + Set up &PRODUCT; Management Server setup: + # cloud-setup-management + Set up the database. The following command creates the "cloud" user on the database. @@ -98,10 +134,10 @@ binlog-format = 'ROW' recommended that you replace this with a more secure value. See . - - (Optional) For management_server_ip, you may explicitly specify cluster management - server node IP. If not specified, the local IP address will be used. - + + (Optional) For management_server_ip, you may explicitly specify cluster management + server node IP. If not specified, the local IP address will be used. + cloud-setup-databases cloud:<dbpassword>@localhost \ --deploy-as=root:<password> \ From 1dc25f25c52b7ef809a47693e5fced8bd2be6672 Mon Sep 17 00:00:00 2001 From: Sebastien Goasguen Date: Mon, 25 Feb 2013 14:25:53 -0500 Subject: [PATCH 3/4] Docs: Fixing issues --- docs/en-US/management-server-install-db-local.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/en-US/management-server-install-db-local.xml b/docs/en-US/management-server-install-db-local.xml index 00ea93b1dcf..918cdc0a265 100644 --- a/docs/en-US/management-server-install-db-local.xml +++ b/docs/en-US/management-server-install-db-local.xml @@ -100,10 +100,6 @@ binlog-format = 'ROW' - - Set up &PRODUCT; Management Server setup: - # cloud-setup-management - Set up the database. The following command creates the "cloud" user on the database. @@ -152,9 +148,6 @@ binlog-format = 'ROW' If you are running the KVM hypervisor on the same machine with the Management Server, edit /etc/sudoers and add the following line: Defaults:cloud !requiretty - - This type of single-machine setup is recommended only for a trial installation. - Now that the database is set up, you can finish configuring the OS for the Management From b1741654452218df731720132e37df9d58259ea4 Mon Sep 17 00:00:00 2001 From: Sebastien Goasguen Date: Mon, 25 Feb 2013 14:44:04 -0500 Subject: [PATCH 4/4] Docs: Fix for CS-1300 --- .../management-server-install-client.xml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/en-US/management-server-install-client.xml b/docs/en-US/management-server-install-client.xml index 899e97c19bc..b5329e3442a 100644 --- a/docs/en-US/management-server-install-client.xml +++ b/docs/en-US/management-server-install-client.xml @@ -29,6 +29,16 @@ The &PRODUCT; Management server can be installed using either RPM or DEB packages. These packages will depend on everything you need to run the Management server. +
+ Install on CentOS/RHEL + We start by installing the required packages: + yum install cloud-client +
+
+ Install on Ubuntu + apt-get install cloud-client +
+
Downloading vhd-util This procedure is required only for installations where XenServer is installed on the @@ -40,13 +50,4 @@ If the Management Server is Ubuntu, copy vhd-util to /usr/lib/cloud/common/scripts/vm/hypervisor/xenserver.
-
- Install on CentOS/RHEL - We start by installing the required packages: - yum install cloud-client -
-
- Install on Ubuntu - apt-get install cloud-client -