You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2017/11/03 18:37:04 UTC
[cloudstack] branch debian9-systemvmtemplate updated (3f818e1 ->
a9f0db7)
This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a change to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git.
omit 3f818e1 Start services after enabling them using systemd
omit f95cd05 Ignore files from build of SSVM
omit 8b829e5 Disable most services by default and enable in cloud-early-config
omit 319247d Accept DOS/MBR as file format for ISO images as well
omit 0f4079f Move systemd services to /etc and enable services after they have been installed
omit c49c352 Load the nf_conntrack_ipv6 module for IPv6 connection tracking on SSVM
omit c712fc2 CLOUDSTACK-10013: Migrate systemvmtemplate to Debian9
add b947eca CLOUDSTACK-9734: Destroy VM Fails sometimes (#2013)
add 0c6cf69 CLOUDSTACK-9717: [VMware] RVRs have mismatching MAC addresses for extra public NICs. (#1878)
add 40d7746 CLOUDSTACK-9967: Fixed static nat iptables rules order issue on additional public subnet ip (#2154)
add deb92d3 CLOUDSTACK-10030: Make sure that public IPs assigned to VPC are reacheable from inside the VPC (#2221)
add f62a8d7 CLOUDSTACK-10022: Allow domain admin to create and delete subdomains (#2222)
add 310195c CLOUDSTACK-10052: Simplify dynamic roles enable checking (#2241)
add 0f27bc9 Merge branch '4.9' into 4.10
add cc749cc Merge branch '4.10'
add 7f987ac CLOUDSTACK-9165: unable to use reserved IP range in a network for external VMs (#1246)
add 1f29313 CLOUDSTACK-10002: Restart network with cleanup spawns Redundant Routers(In Default Network Offering) (#2186)
add 57255ac CLOUDSTACK-9914: Update Quota plugin to support currency values up to 5 decimal places (#2123)
add 4b38d36 CLOUDSTACK-9915 ListSnapshots API does not provide virtual size information of the snapshots (#2101)
add a8c09f2 CLOUDSTACK-9996: Fix juniper vlan untagged jedgement and xml element replacment (#2174)
add 4268944 CE-110 move config to public fields
add 693d63e CE-110 remove duplicate-unused functionality
add c10c342 CE-110 task for marking cleaning fully cloned templates implemented by marking them for GC
add 16b34c9 CE-110 default interval of 0 minutes means do not mark for cleaning
add 94718c0 CE-110 markedForGC is ignored so delete the templates in the task that finds them
add 64e56a2 Merge pull request #2044 from shapeblue/cleanup-unlinked-templates
add 7ce54bf CLOUDSTACK-9993: Securing Agents Communications (#2239)
add a444077 docker: increased jetty timeout (#2245)
add 8502a66 CLOUDSTACK-10027: Repeating the same list for Internal LB in VPC (#2216)
add 3fc696e CLOUDSTACK-9954 Unable to create service offering with networkrate=0
add 31f27da Merge branch 'master' of https://github.com/apache/cloudstack
add f66bbb9 CLOUDSTACK-9922 Unable to use 8081 port for Load balancing
add 6e832b5 Merge pull request #2109 from Accelerite/CLOUDSTACK-9922
add 212e5cc CLOUDSTACK-9782: Host HA and KVM HA provider
add c0b33db CLOUDSTACK-9782: Nested-oobm CloudStack plugin
add d2c3408 CLOUDSTACK-9782: Improve scheduling of jobs
add f917ab6 CLOUDSTACK-9782: Improve host HA tests
add 01b040d CLOUDSTACK-9314: Remove unused code from XenServerStorageProcessor (#1443)
add bf35aef CLOUDSTACK-10032 : Database entries for templates created from snapshots disappear after management-server service restart (#2224)
add d1e61eb CLOUDSTACK-9812: Update 'updatePortForwardingRule' api to include additional parameter end port (#1985)
add dfd01c99 CLOUDSTACK-10059: Dashboard ignores resource value that is less than 1%
add 0d81e88 CLOUDSTACK-8939: VM Snapshot size with memory correctly calculated in cloud.usage_event (XenServer) (#914)
add 74fe9e3 CLOUDSTACK-10004 : On deletion, Vmware volume snapshots are left behind with message 'the snapshot has child, can't delete it on the storage' (#2188)
add 4dd8b5d CLOUDSTACK-9563: ExtractTemplate returns malformed URL after migrating NFS to s3 (#1733)
add a52ce36 CLOUDSTACK-10058: Error while opening the Settings tab in Secondary storage (#2254)
add f5cebeb CLOUDSTACK-10061: When starting a VM, make sure it is attached to correct VAG when using managed storage (#2253)
add 6f157cc CLOUDSTACK-9782: Fix intermittent host-ha KVM test failures (#2256)
add d145944 Updating pom.xml version numbers for release 4.9.3.0
add 774998d Updating pom.xml version numbers for release 4.9.4.0-SNAPSHOT
add 854d9e0 Merge branch '4.9' into 4.10
add f2cb218 Merge branch '4.10'
add 85e57d1 CLOUDSTACK-10069: Add sha512 suffix to SHA 512 checksum (#2262)
add a90b600 Merge branch '4.9' into 4.10
add a6b41c1 Merge branch '4.10'
add 48fa206 CLOUDSTACK-9963 Root Disk controller value is changing while migrating VM
add c4ca420 CLOUDSTACK-8969: VPN customer gateway can't be registered with hostname (#955)
add e894022 CLOUDSTACK-9886 : After restarting cloudstack-management , It takes time to connect hosts
add b655f9b Merge pull request #2054 from Accelerite/cs-51009
add d84585f CLOUDSTACK-10068: Fixing test_iso.py assertions are equating srt and bool instead of the same types (#2261)
add c7a55eb CLOUDSTACK-10019: template.properties has hardcoded id (#2243)
add 2ccea13 CLOUDSTACK-10056: Fix vm details usage (#2248)
add 2bad9a6 CLOUDSTACK-9949: add ability to specify mac address (#2143)
add a4036f7 CLOUDSTACK-10067: Fix a case where a user 'ro' or 'roo' exists on the system, or other variants. (#2252)
add 3bc2341 CLOUDSTACK-9902: add consoleproxy.sslEnable global setting (#2078)
add 3f69c83 CLOUDSTACK-9956: File search on the vmware datastore may select wrong file if there are multiple files with same name (#2153)
add f2584bb CLOUDSTACK-9182: Some running VMs turned off on manual migration when auto migration failed while host preparing for maintenance. (#1252)
add c670691 CLOUDSTACK-8865: Adding SR doesn't create Storage_pool_host_ref entry for disabled host (#876)
add e1cff7d CLOUDSTACK-10083: Allow ModifySshKeys to be forwarded to the agent in maintenance mode (#2269)
add b130e55 CLOUDSTACK-9397: Add Watchdog timer to KVM Instance (#1707)
add a06530d CLOUDSTACK-10007 Isolation method claim (#2249)
add 3381c38 CLOUDSTACK-10073: KVM host RAM overprovisioning (#2266)
add 19706b9 CLOUDSTACK-10099: Fix migrateVirtualMachineWithVolume UI failure (#2277)
add 74ec9ce CLOUDSTACK-9584: Re-arrange failing project_limits test (#2279)
add 0dfdbe0 CLOUDSTACK-9993: With auth strictness stop SSL handshake for rogue clients (#2278)
add b044f1b CLOUDSTACK-9859: Retirement of midonet plugin (final removal) (#2285)
add f1c01a5 CLOUDSTACK-10101: Present the full domain name when listing user's domains in SAML2 plugin (#2280)
add 5636c9b CLOUDSTACK-8308 automation test for Delta Snapshot
add 7ca5b53 CLOUDSTACK-9899 Url validation disabling (#2074)
add ed7811a CLOUDSTACK-10046 checksum validation for any java supported Digests-type (#2246)
add 0fedbdd CLOUDSTACK-9998: Prometheus Exporter for CloudStack (#2287)
add c3ed1b3 CLOUDSTACK-9993: Have basic constraint in CA certificate (#2286)
add 189b0e4 CLOUDSTACK-10060: ListUsage API always displays the Virtual size as '0' for Usage type=9 (snapshot) (#2257)
add a379230 CLOUDSTACK-9957 Annotations (#2181)
add 3985c68 CLOUDSTACK-10007 no isolationmethod check for directpodbase basic zone nets (#2296)
add 6bb0ca2 This feature separates the snapshot creation on primary and its backing up on secondary. As part of this, a new parameter, which is optional, is added to CreateSnapshotCmd, which seperates the creation and backup.
add 4c89b5b Merge branch 'pr-2081'
add 285fd77 CLOUDSTACK-9957 test fix (#2297)
add bd953d8 CLOUDSTACK-10107: For VMware VMs add devices without unit number (#2288)
add b6dc40f CLOUDSTACK-10103: Cloudian Connector for CloudStack (#2284)
add 382d458 CLOUDSTACK-10113 password resets only one at the time
add 4f6b91d Merge release branch 4.9 to 4.10
add 4d19373 Merge release branch 4.10 to master
add 41fdb88 CLOUDSTACK-10047: DVSwitch fixes and improvements (#2293)
add 9c7cd8c CLOUDSTACK-10081: CloudUtils getDevInfo function will now return "bridge" instead of "dev" when the name of a ovs bridge is passed.
add ca13048 Merge pull request #2268 from nuagenetworks/bugfix/CLOUDSTACK-10081
add 587b66d CLOUDSTACK-10057: listNetworkOfferings now returns the correct number of offerings (#2250)
add 0871ff9 CLOUDSTACK-10053: Performance improvement: caching of NuageVsp ID
add 2139dbe Merge pull request #2238 from nuagenetworks/feature/caching_and_statistics
add 1d382e0 CLOUDSTACK-9832: Remove public interface from VPC Virtual Router
add d077b3e Merge pull request #2004 from nuagenetworks/feature/vr_without_public_ip
add 1d36b72 CLOUDSTACK-10120 : Allow migration of VM's from Cloudstack UI between the hosts with different version
add a50a461 CLOUDSTACK-10085 : Upload volume from local fails when global config max.account.seconday.storage is set to -1
add 1315c94 CLOUDSTACK-10122: Unrelated error message (#2302)
add c6b808f CLOUDSTACK-10111: Fix validation for parameter "vm.password.length" (#2291)
add e9f29c7 CLOUDSTACK-10012: Introduce Embedded Jetty with shaded jar
add eda3b35 CLOUDSTACK-10012: Migrate to Embedded Jetty
new ea95fa2 CLOUDSTACK-10013: Migrate systemvmtemplate to Debian9
new bcb2f5e Load the nf_conntrack_ipv6 module for IPv6 connection tracking on SSVM
new d6896b7 Move systemd services to /etc and enable services after they have been installed
new 1305744 Accept DOS/MBR as file format for ISO images as well
new 790dcb6 Disable most services by default and enable in cloud-early-config
new b2db1d9 Ignore files from build of SSVM
new a9f0db7 Start services after enabling them using systemd
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (3f818e1)
\
N -- N -- N refs/heads/debian9-systemvmtemplate (a9f0db7)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.travis.yml | 22 +-
INSTALL.md | 4 +-
README.md | 2 +-
agent/conf/agent.properties | 18 +-
agent/src/com/cloud/agent/Agent.java | 127 +-
agent/src/com/cloud/agent/AgentShell.java | 13 +-
.../cloud/agent/dao/impl/PropertiesStorage.java | 29 +-
.../consoleproxy/ConsoleProxyResource.java | 12 +-
agent/test/com/cloud/agent/AgentShellTest.java | 15 +
api/pom.xml | 5 +
api/src/com/cloud/agent/api/to/NicTO.java | 12 +
api/src/com/cloud/dc/DataCenter.java | 5 +-
api/src/com/cloud/event/EventTypes.java | 32 +-
api/src/com/cloud/host/Host.java | 14 +-
api/src/com/cloud/host/Status.java | 2 +
api/src/com/cloud/network/Network.java | 14 +
api/src/com/cloud/network/NetworkModel.java | 5 +-
api/src/com/cloud/network/Networks.java | 4 +
api/src/com/cloud/network/rules/RulesService.java | 2 +-
api/src/com/cloud/offering/NetworkOffering.java | 2 +-
api/src/com/cloud/org/Cluster.java | 6 +-
api/src/com/cloud/resource/ResourceState.java | 3 +
api/src/com/cloud/storage/ImageStore.java | 7 +
api/src/com/cloud/storage/Snapshot.java | 2 +
api/src/com/cloud/storage/VolumeApiService.java | 2 +-
api/src/com/cloud/vm/NicProfile.java | 5 +
api/src/com/cloud/vm/VirtualMachine.java | 18 +-
api/src/com/cloud/vm/VmDetailConstants.java | 3 +
.../org/apache/cloudstack/alert/AlertService.java | 8 +-
.../apache/cloudstack/annotation/Annotation.java} | 31 +-
.../cloudstack/annotation/AnnotationService.java | 49 +
api/src/org/apache/cloudstack/api/APICommand.java | 5 +-
.../cloudstack/api/AbstractGetUploadParamsCmd.java | 8 +-
.../org/apache/cloudstack/api/ApiConstants.java | 26 +
api/src/org/apache/cloudstack/api/BaseCmd.java | 53 +-
.../command/admin/annotation/AddAnnotationCmd.java | 86 +
.../admin/annotation/ListAnnotationsCmd.java | 81 +
.../admin/annotation/RemoveAnnotationCmd.java | 64 +
.../api/command/admin/ca/IssueCertificateCmd.java | 162 ++
.../api/command/admin/ca/ListCAProvidersCmd.java | 102 ++
.../api/command/admin/ca/ListCaCertificateCmd.java | 90 ++
.../command/admin/ca/ProvisionCertificateCmd.java | 125 ++
.../api/command/admin/ca/RevokeCertificateCmd.java | 116 ++
.../api/command/admin/domain/CreateDomainCmd.java | 11 +-
.../api/command/admin/domain/DeleteDomainCmd.java | 11 +-
.../command/admin/ha/ConfigureHAForHostCmd.java | 127 ++
.../command/admin/ha/DisableHAForClusterCmd.java | 114 ++
.../api/command/admin/ha/DisableHAForHostCmd.java | 116 ++
.../api/command/admin/ha/DisableHAForZoneCmd.java | 115 ++
.../command/admin/ha/EnableHAForClusterCmd.java | 114 ++
.../api/command/admin/ha/EnableHAForHostCmd.java | 116 ++
.../api/command/admin/ha/EnableHAForZoneCmd.java | 115 ++
.../command/admin/ha/ListHostHAProvidersCmd.java | 106 ++
.../command/admin/ha/ListHostHAResourcesCmd.java | 109 ++
.../api/command/admin/host/UpdateHostCmd.java | 22 +-
.../admin/network/CreateNetworkCmdByAdmin.java | 10 +
.../admin/network/CreateNetworkOfferingCmd.java | 3 +-
.../user/firewall/UpdatePortForwardingRuleCmd.java | 12 +-
.../api/command/user/iso/RegisterIsoCmd.java | 2 +-
.../command/user/snapshot/CreateSnapshotCmd.java | 13 +-
.../command/user/template/RegisterTemplateCmd.java | 2 +-
.../api/command/user/vm/AddNicToVMCmd.java | 17 +
.../api/command/user/vm/DeployVMCmd.java | 29 +-
.../api/command/user/volume/UploadVolumeCmd.java | 2 +-
.../api/response/AnnotationResponse.java | 121 ++
.../api/response/CAProviderResponse.java | 52 +
.../api/response/CertificateResponse.java | 58 +
.../api/response/HAProviderResponse.java | 58 +
.../cloudstack/api/response/HostHAResponse.java | 104 ++
.../cloudstack/api/response/HostResponse.java | 36 +
.../api/response/OutOfBandManagementResponse.java | 2 +-
.../cloudstack/api/response/SnapshotResponse.java | 8 +
api/src/org/apache/cloudstack/ca/CAManager.java | 163 ++
api/src/org/apache/cloudstack/ha/HAConfig.java | 146 ++
.../org/apache/cloudstack/ha/HAConfigManager.java | 96 ++
.../BackgroundPollTask.java => ha/HAResource.java} | 20 +-
.../Partition.java} | 11 +-
.../outofbandmanagement/OutOfBandManagement.java | 4 +-
.../apache/cloudstack/poll/BackgroundPollTask.java | 6 +
api/test/com/cloud/network/NetworksTest.java | 19 +-
.../admin/annotation/AddAnnotationCmdTest.java | 25 +-
.../api/command/test/CreateSnapshotCmdTest.java | 4 +-
build/replace.properties | 2 +-
client/WEB-INF/web.xml | 51 +-
client/bindir/cloud-setup-management.in | 4 +-
.../commons-logging.properties.in | 4 +-
client/{tomcatconf => conf}/db.properties.in | 7 +-
client/{tomcatconf => conf}/ehcache.xml.in | 26 +-
.../{tomcatconf => conf}/environment.properties.in | 4 +-
.../{tomcatconf => conf}/java.security.ciphers.in | 0
client/{tomcatconf => conf}/log4j-cloud.xml.in | 16 +-
.../script.sh => client/conf/server.properties.in | 34 +-
.../SYSCONFDIR/rc.d/init.d/cloud-management.in | 107 --
.../SYSCONFDIR/sysconfig/cloud-management.in | 23 -
.../SYSCONFDIR/rc.d/init.d/cloud-management.in | 106 --
.../SYSCONFDIR/sysconfig/cloud-management.in | 23 -
.../opensuse/SYSCONFDIR/init.d/cloud-management.in | 239 ---
.../SYSCONFDIR/sysconfig/cloud-management.in | 23 -
.../SYSCONFDIR/rc.d/init.d/cloud-management.in | 108 --
.../rhel/SYSCONFDIR/sysconfig/cloud-management.in | 23 -
.../sles/SYSCONFDIR/init.d/cloud-management.in | 239 ---
.../sles/SYSCONFDIR/sysconfig/cloud-management.in | 23 -
.../ubuntu/SYSCONFDIR/init.d/cloud-management.in | 244 ---
client/pom.xml | 243 ++-
client/src/org/apache/cloudstack/ServerDaemon.java | 310 ++++
client/tomcatconf/catalina.policy.in | 180 ---
client/tomcatconf/catalina.properties.in | 81 -
client/tomcatconf/classpath.conf.in | 41 -
client/tomcatconf/cloudmanagementserver.keystore | Bin 1316 -> 0 bytes
client/tomcatconf/context.xml.in | 35 -
client/tomcatconf/logging.properties.in | 64 -
client/tomcatconf/server-nonssl.xml.in | 149 --
client/tomcatconf/server-ssl.xml.in | 157 --
client/tomcatconf/server7-nonssl.xml.in | 149 --
client/tomcatconf/server7-ssl.xml.in | 157 --
client/tomcatconf/tomcat-users.xml.in | 31 -
client/tomcatconf/tomcat6-nonssl.conf.in | 73 -
client/tomcatconf/tomcat6-ssl.conf.in | 72 -
client/tomcatconf/web.xml.in | 1187 --------------
core/pom.xml | 2 +-
.../META-INF/cloudstack/ca/module.properties | 5 +-
...ring-core-lifecycle-ca-context-inheritable.xml} | 23 +-
...-core-lifecycle-compute-context-inheritable.xml | 5 +
.../core/spring-core-registry-core-context.xml | 11 +-
.../api/CheckVMActivityOnStoragePoolCommand.java | 70 +
.../cloud/agent/api/ComputeChecksumCommand.java | 14 +-
.../agent/api/routing/NetworkElementCommand.java | 13 +
.../virtualnetwork/VirtualRoutingResource.java | 44 +
.../storage/template/HttpTemplateDownloader.java | 424 +++--
.../cloudstack/ca/SetupCertificateAnswer.java | 12 +-
.../cloudstack/ca/SetupCertificateCommand.java | 99 ++
.../apache/cloudstack/ca/SetupKeyStoreCommand.java | 75 +
.../apache/cloudstack/ca/SetupKeystoreAnswer.java | 20 +-
.../api/agent/test/CheckOnHostCommandTest.java | 19 +-
debian/cloudstack-agent.postinst | 0
debian/cloudstack-management.install | 17 +-
debian/cloudstack-management.postinst | 26 +-
.../cloudstack-management.preinst | 14 +-
debian/cloudstack-marvin.postinst | 0
debian/cloudstack-usage.postinst | 0
debian/control | 7 +-
debian/rules | 23 +-
developer/developer-prefill.sql | 5 +
engine/api/pom.xml | 15 -
.../service/NetworkOrchestrationService.java | 22 +-
.../engine/subsystem/api/storage/SnapshotInfo.java | 4 +
.../subsystem/api/storage/SnapshotService.java | 6 +
.../subsystem/api/storage/SnapshotStrategy.java | 3 +
.../src/com/cloud/agent/AgentManager.java | 2 +
.../cloud/configuration/ConfigurationManager.java | 2 +-
.../src/com/cloud/network/vpc/VpcManager.java | 7 +
.../src/com/cloud/resource/ResourceManager.java | 2 +
.../src/com/cloud/storage/StorageManager.java | 2 +
.../src/com/cloud/template/TemplateManager.java | 2 +-
.../src/com/cloud/vm/VmWorkTakeVolumeSnapshot.java | 8 +-
.../src/com/cloud/agent/manager/AgentAttache.java | 3 +-
.../com/cloud/agent/manager/AgentManagerImpl.java | 6 +-
.../agent/manager/ClusteredAgentManagerImpl.java | 28 +-
.../com/cloud/vm/VirtualMachineManagerImpl.java | 57 +-
.../datacenter/entity/api/db/EngineClusterVO.java | 31 +-
.../entity/api/db/EngineDataCenterVO.java | 29 +-
.../datacenter/entity/api/db/EngineHostVO.java | 45 +-
.../engine/orchestration/NetworkOrchestrator.java | 79 +-
.../engine/orchestration/VolumeOrchestrator.java | 41 +-
.../spring-engine-schema-core-daos-context.xml | 5 +-
engine/schema/src/com/cloud/certificate/CrlVO.java | 85 +
.../src/com/cloud/certificate/dao/CrlDao.java | 13 +-
.../src/com/cloud/certificate/dao/CrlDaoImpl.java | 57 +
engine/schema/src/com/cloud/dc/ClusterVO.java | 22 +-
engine/schema/src/com/cloud/dc/DataCenterVO.java | 20 +-
.../src/com/cloud/dc/dao/DataCenterVnetDao.java | 4 +-
.../com/cloud/dc/dao/DataCenterVnetDaoImpl.java | 45 +-
engine/schema/src/com/cloud/host/HostVO.java | 38 +-
engine/schema/src/com/cloud/host/dao/HostDao.java | 2 +
.../schema/src/com/cloud/host/dao/HostDaoImpl.java | 21 +-
.../src/com/cloud/network/dao/NetworkDao.java | 4 +-
.../src/com/cloud/network/dao/NetworkDaoImpl.java | 54 +-
.../src/com/cloud/network/dao/NetworkVO.java | 17 +-
.../schema/src/com/cloud/storage/SnapshotVO.java | 5 +
.../src/com/cloud/upgrade/dao/Upgrade481to490.java | 45 +-
engine/schema/src/com/cloud/vm/VMInstanceVO.java | 33 +-
engine/schema/src/com/cloud/vm/dao/NicDao.java | 4 +
engine/schema/src/com/cloud/vm/dao/NicDaoImpl.java | 29 +
.../src/com/cloud/vm/dao/NicSecondaryIpDao.java | 2 +
.../com/cloud/vm/dao/NicSecondaryIpDaoImpl.java | 14 +-
.../schema/src/com/cloud/vm/dao/VMInstanceDao.java | 2 +
.../src/com/cloud/vm/dao/VMInstanceDaoImpl.java | 15 +
.../apache/cloudstack/annotation/AnnotationVO.java | 154 ++
.../cloudstack/annotation/dao/AnnotationDao.java | 13 +-
.../annotation/dao/AnnotationDaoImpl.java | 59 +
.../engine/cloud/entity/api/db/VMEntityVO.java | 5 +
.../HAConfigVO.java} | 127 +-
.../org/apache/cloudstack/ha/dao/HAConfigDao.java} | 33 +-
.../apache/cloudstack/ha/dao/HAConfigDaoImpl.java | 149 ++
.../outofbandmanagement/OutOfBandManagementVO.java | 6 +-
engine/schema/test/resources/db.properties | 2 +-
engine/service/src/main/webapp/WEB-INF/log4j.xml | 14 +-
engine/service/src/main/webapp/WEB-INF/web.xml | 3 -
.../storage/motion/AncientDataMotionStrategy.java | 6 +-
.../storage/image/store/ImageStoreImpl.java | 5 +
.../test/resource/fakeDriverTestContext.xml | 1 -
.../test/resources/storageContext.xml | 1 -
.../storage/snapshot/SnapshotBackupException.java} | 16 +-
.../storage/snapshot/SnapshotObject.java | 16 +
.../storage/snapshot/SnapshotServiceImpl.java | 70 +-
.../snapshot/SnapshotStateMachineManagerImpl.java | 1 +
.../snapshot/StorageSystemSnapshotStrategy.java | 32 +-
.../snapshot/XenserverSnapshotStrategy.java | 102 +-
.../storage/snapshot/test/resources/db.properties | 2 +-
.../storage/image/db/SnapshotDataStoreDaoImpl.java | 68 +-
.../storage/snapshot/SnapshotEntityImpl.java | 6 +
.../volume/db/TemplatePrimaryDataStoreDaoImpl.java | 123 --
.../volume/db/TemplatePrimaryDataStoreVO.java | 262 ----
.../globodns => framework/ca}/pom.xml | 18 +-
.../apache/cloudstack/framework/ca/CAProvider.java | 107 ++
.../apache/cloudstack/framework/ca/CAService.java | 50 +
.../cloudstack/framework/ca/Certificate.java | 40 +-
.../cloudstack/framework/config/ConfigKey.java | 3 +-
.../apache/cloudstack/framework/jobs/AsyncJob.java | 2 +
.../framework/jobs/impl/AsyncJobManagerImpl.java | 22 +
framework/pom.xml | 1 +
packaging/centos63/cloud-management.rc | 197 ++-
packaging/centos63/cloud-management.sysconfig | 23 -
packaging/centos63/cloud.spec | 130 +-
packaging/centos7/cloud.spec | 80 +-
packaging/centos7/tomcat7/catalina.properties | 81 -
.../centos7/tomcat7/commons-logging.properties | 30 -
packaging/centos7/tomcat7/db.properties | 106 --
packaging/centos7/tomcat7/environment.properties | 22 -
packaging/centos7/tomcat7/java.security.ciphers | 18 -
packaging/centos7/tomcat7/log4j-cloud.xml | 199 ---
packaging/centos7/tomcat7/server.xml | 80 -
packaging/centos7/tomcat7/tomcat-users.xml | 31 -
packaging/centos7/tomcat7/web.xml | 1187 --------------
packaging/debian/init/cloud-management | 153 +-
packaging/debian/replace.properties | 2 +-
packaging/fedora20/cloud-agent.rc | 118 --
packaging/fedora20/cloud-ipallocator.rc | 96 --
packaging/fedora20/cloud-management.rc | 115 --
packaging/fedora20/cloud-management.sysconfig | 23 -
packaging/fedora20/cloud-usage.rc | 156 --
packaging/fedora20/cloud.spec | 655 --------
packaging/fedora20/cloudstack-agent.te | 33 -
packaging/fedora20/cloudstack-sccs | 20 -
packaging/fedora20/replace.properties | 59 -
packaging/fedora21/cloud-agent.rc | 118 --
packaging/fedora21/cloud-ipallocator.rc | 96 --
packaging/fedora21/cloud-management.rc | 115 --
packaging/fedora21/cloud-management.sysconfig | 23 -
packaging/fedora21/cloud-usage.rc | 156 --
packaging/fedora21/cloud.spec | 655 --------
packaging/fedora21/cloudstack-agent.te | 33 -
packaging/fedora21/replace.properties | 59 -
packaging/systemd/cloudstack-management.default | 34 +-
.../systemd/cloudstack-management.default.ubuntu | 50 -
packaging/systemd/cloudstack-management.service | 16 +-
.../systemd/cloudstack-management.service.ubuntu | 40 -
.../midonet => ca/root-ca}/pom.xml | 32 +-
.../META-INF/cloudstack/root-ca/module.properties | 4 +-
.../cloudstack/root-ca/spring-root-ca-context.xml} | 18 +-
.../ca/provider/RootCACustomTrustManager.java | 146 ++
.../cloudstack/ca/provider/RootCAProvider.java | 413 +++++
.../ca/provider/RootCACustomTrustManagerTest.java | 110 ++
.../cloudstack/ca/provider/RootCAProviderTest.java | 155 ++
plugins/event-bus/kafka/pom.xml | 2 +-
plugins/event-bus/rabbitmq/pom.xml | 2 +-
.../kvm-compute/spring-kvm-compute-context.xml | 7 +
.../kvm/src/com/cloud/ha/KVMInvestigator.java | 21 +-
.../cloud/hypervisor/kvm/resource/KVMHABase.java | 5 +
.../hypervisor/kvm/resource/KVMHAChecker.java | 10 +-
.../hypervisor/kvm/resource/KVMHAMonitor.java | 24 +-
.../kvm/resource/KVMHAVMActivityChecker.java | 70 +
.../kvm/resource/LibvirtComputingResource.java | 38 +-
.../kvm/resource/LibvirtDomainXMLParser.java | 29 +
.../hypervisor/kvm/resource/LibvirtVMDef.java | 61 +
.../wrapper/LibvirtCheckOnHostCommandWrapper.java | 6 +-
...CheckVMActivityOnStoragePoolCommandWrapper.java | 65 +
.../org/apache/cloudstack/kvm/ha/KVMHAConfig.java | 56 +
.../apache/cloudstack/kvm/ha/KVMHAProvider.java | 157 ++
.../cloudstack/kvm/ha/KVMHostActivityChecker.java | 205 +++
.../kvm/resource/LibvirtComputingResourceTest.java | 3 +
.../kvm/resource/LibvirtDomainXMLParserTest.java | 6 +
.../hypervisor/kvm/resource/LibvirtVMDefTest.java | 9 +
.../apache/cloudstack/kvm/ha/KVMHostHATest.java | 84 +
plugins/hypervisors/ovm3/pom.xml | 5 -
plugins/hypervisors/simulator/pom.xml | 5 +
.../spring-simulator-compute-context.xml | 4 +
.../com/cloud/agent/manager/MockAgentManager.java | 7 +
.../cloud/agent/manager/MockAgentManagerImpl.java | 24 +-
.../cloud/agent/manager/SimulatorManagerImpl.java | 10 +
.../ConfigureSimulatorHAProviderState.java | 120 ++
.../commands/ListSimulatorHAStateTransitions.java | 104 ++
.../api/response/SimulatorHAStateResponse.java | 65 +
.../src/com/cloud/ha/SimulatorInvestigator.java | 10 +
.../apache/cloudstack/ha/SimulatorHAProvider.java | 160 ++
.../org/apache/cloudstack/ha/SimulatorHAState.java | 89 ++
.../src/com/cloud/hypervisor/guru/VMwareGuru.java | 18 +
.../manager/CleanupFullyClonedTemplatesTask.java | 158 ++
.../hypervisor/vmware/manager/VmwareManager.java | 22 +-
.../vmware/manager/VmwareManagerImpl.java | 190 ++-
.../vmware/manager/VmwareStorageManagerImpl.java | 11 +-
.../hypervisor/vmware/resource/VmwareResource.java | 113 +-
.../resource/VmwareStorageLayoutHelper.java | 35 +-
.../storage/resource/VmwareStorageProcessor.java | 23 +-
.../vmware/VmwareDatacenterApiUnitTest.java | 115 +-
.../vmware/resource/VmwareResourceTest.java | 34 +
.../xenserver/resource/CitrixResourceBase.java | 42 +-
.../resource/XenServerStorageProcessor.java | 183 +--
.../CitrixCreateVMSnapshotCommandWrapper.java | 8 +-
.../CitrixDeleteVMSnapshotCommandWrapper.java | 9 +-
{api => plugins/integrations/cloudian}/pom.xml | 54 +-
.../META-INF/cloudstack/cloudian/module.properties | 4 +-
.../cloudian/spring-cloudian-context.xml} | 13 +-
.../cloudstack/cloudian/CloudianConnector.java | 82 +
.../cloudstack/cloudian/CloudianConnectorImpl.java | 345 +++++
.../cloudian/api/CloudianIsEnabledCmd.java | 65 +
.../cloudian/api/CloudianSsoLoginCmd.java | 70 +
.../cloudstack/cloudian/client/CloudianClient.java | 347 +++++
.../cloudstack/cloudian/client/CloudianGroup.java | 44 +-
.../cloudstack/cloudian/client/CloudianUser.java | 85 +
.../cloudstack/cloudian/client/CloudianUtils.java | 92 ++
.../cloudian/response/CloudianEnabledResponse.java | 40 +-
.../response/CloudianSsoLoginResponse.java | 25 +-
.../cloudstack/cloudian/CloudianClientTest.java | 416 +++++
.../rabbitmq => integrations/prometheus}/pom.xml | 25 +-
.../cloudstack/prometheus}/module.properties | 4 +-
.../prometheus/spring-prometheus-context.xml} | 15 +-
.../cloudstack/metrics/PrometheusExporter.java | 7 +-
.../cloudstack/metrics/PrometheusExporterImpl.java | 612 ++++++++
.../metrics/PrometheusExporterServer.java | 33 +
.../metrics/PrometheusExporterServerImpl.java | 118 ++
plugins/network-elements/globodns/pom.xml | 2 +-
.../globodns/test/resources/db.properties | 2 +-
.../element/InternalLoadBalancerElement.java | 8 +-
.../ElementChildTestConfiguration.java | 6 +
plugins/network-elements/juniper-contrail/pom.xml | 6 +
.../cloud/network/resource/JuniperSrxResource.java | 4 +-
.../com/cloud/network/element/MidoNetElement.java | 1635 --------------------
.../cloud/network/element/SimpleFirewallRule.java | 219 ---
.../network/guru/MidoNetGuestNetworkGuru.java | 160 --
.../network/guru/MidoNetPublicNetworkGuru.java | 252 ---
.../cloud/network/resource/MidoNetVifDriver.java | 169 --
.../cloud/network/element/MidoNetElementTest.java | 199 ---
plugins/network-elements/nuage-vsp/pom.xml | 2 +-
.../api/manager/ImplementNetworkVspAnswer.java | 33 +-
.../com/cloud/network/element/NuageVspElement.java | 18 +-
.../network/guru/NuageVspGuestNetworkGuru.java | 106 +-
.../cloud/network/manager/AbstractListener.java | 91 ++
.../com/cloud/network/manager/NuageVspManager.java | 28 +-
.../cloud/network/manager/NuageVspManagerImpl.java | 339 ++--
.../cloud/network/resource/NuageVspResource.java | 86 +-
.../resource/NuageVspResourceConfiguration.java | 5 +-
.../cloud/network/resource/VspStatisticsMBean.java | 66 +
.../network/resource/VspStatisticsMBeanImpl.java | 66 +
...NuageVspGuruImplementNetworkCommandWrapper.java | 25 +-
.../src/com/cloud/util/NuageVspEntityBuilder.java | 248 +--
.../nuage-vsp/test/com/cloud/NuageTest.java | 11 +
.../network/guru/NuageVspGuestNetworkGuruTest.java | 4 +
.../network/resource/NuageVspResourceTest.java | 3 +-
.../com/cloud/util/NuageVspEntityBuilderTest.java | 72 +-
.../nested-cloudstack}/pom.xml | 25 +-
.../nested-cloudstack}/module.properties | 4 +-
.../spring-nested-cloudstack-context.xml} | 15 +-
.../NestedCloudStackOutOfBandManagementDriver.java | 147 ++
...tedCloudStackOutOfBandManagementDriverTest.java | 75 +
plugins/pom.xml | 10 +-
.../ElastistorPrimaryDataStoreLifeCycle.java | 2 +-
.../CloudStackPrimaryDataStoreLifeCycleImpl.java | 2 +-
...loudStackPrimaryDataStoreLifeCycleImplTest.java | 170 ++
.../SolidFireSharedPrimaryDataStoreLifeCycle.java | 2 +-
.../api/command/ListAndSwitchSAMLAccountCmd.java | 1 +
.../api/response/SamlUserAccountResponse.java | 13 +
.../cloudstack/saml/SAML2AuthManagerImpl.java | 99 +-
.../src/org/apache/cloudstack/saml/SAMLUtils.java | 158 +-
.../GetServiceProviderMetaDataCmdTest.java | 30 +-
.../test/org/apache/cloudstack/SAMLUtilsTest.java | 20 +-
.../command/SAML2LoginAPIAuthenticatorCmdTest.java | 35 +-
.../SAML2LogoutAPIAuthenticatorCmdTest.java | 19 +-
pom.xml | 105 +-
.../bindir/cloud-grab-dependent-library-versions | 2 +-
python/lib/cloudutils/globalEnv.py | 2 -
python/lib/cloudutils/networkConfig.py | 2 +-
python/lib/cloudutils/serviceConfigServer.py | 81 +-
scripts/common/keys/ssl-keys.py | 58 -
scripts/installer/createtmplt.sh | 1 +
scripts/installer/createvolume.sh | 1 +
scripts/installer/windows/acs.wxs | 3 -
scripts/installer/windows/client.wxs | 9 -
scripts/network/domr/router_proxy.sh | 10 +-
scripts/storage/qcow2/createtmplt.sh | 24 +-
scripts/storage/qcow2/createvolume.sh | 24 +-
scripts/storage/secondary/createtmplt.sh | 34 +-
scripts/storage/secondary/createvolume.sh | 1 +
scripts/util/keystore-cert-import | 100 ++
scripts/util/keystore-setup | 51 +
scripts/vm/hypervisor/kvm/kvmvmactivity.sh | 135 ++
server/pom.xml | 5 +
.../core/spring-server-core-managers-context.xml | 16 +
server/src/com/cloud/alert/AlertManagerImpl.java | 4 +-
server/src/com/cloud/api/ApiResponseHelper.java | 1 +
.../com/cloud/api/query/dao/HostJoinDaoImpl.java | 9 +
server/src/com/cloud/api/query/vo/HostJoinVO.java | 53 +-
server/src/com/cloud/configuration/Config.java | 51 +-
.../configuration/ConfigurationManagerImpl.java | 43 +-
.../consoleproxy/ConsoleProxyManagerImpl.java | 3 +-
.../com/cloud/hypervisor/HypervisorGuruBase.java | 20 +-
.../kvm/discoverer/LibvirtServerDiscoverer.java | 116 +-
.../com/cloud/network/IpAddressManagerImpl.java | 15 +-
server/src/com/cloud/network/NetworkModelImpl.java | 21 +-
.../src/com/cloud/network/NetworkServiceImpl.java | 27 +-
.../network/element/VirtualRouterElement.java | 111 +-
.../com/cloud/network/guru/DirectNetworkGuru.java | 24 +-
.../network/guru/DirectPodBasedNetworkGuru.java | 5 +-
.../com/cloud/network/guru/GuestNetworkGuru.java | 2 +-
.../com/cloud/network/router/NetworkHelper.java | 5 +-
.../cloud/network/router/NetworkHelperImpl.java | 109 +-
.../cloud/network/router/NicProfileHelperImpl.java | 2 +-
.../router/VirtualNetworkApplianceManagerImpl.java | 2 +-
.../cloud/network/router/VpcNetworkHelperImpl.java | 77 +-
.../com/cloud/network/rules/RulesManagerImpl.java | 32 +-
.../src/com/cloud/network/vpc/VpcManagerImpl.java | 35 +-
.../cloud/network/vpn/Site2SiteVpnManagerImpl.java | 8 +-
.../com/cloud/resource/ResourceManagerImpl.java | 20 +-
.../com/cloud/server/ConfigurationServerImpl.java | 126 +-
.../src/com/cloud/server/ManagementServerImpl.java | 4 +-
.../com/cloud/servlet/StaticResourceServlet.java | 115 --
.../com/cloud/storage/CreateSnapshotPayload.java | 9 +
.../src/com/cloud/storage/StorageManagerImpl.java | 13 +-
.../com/cloud/storage/VolumeApiServiceImpl.java | 37 +-
.../cloud/storage/snapshot/SnapshotManager.java | 12 +-
.../storage/snapshot/SnapshotManagerImpl.java | 75 +-
.../com/cloud/template/TemplateManagerImpl.java | 6 +-
server/src/com/cloud/test/DatabaseConfig.java | 38 +-
server/src/com/cloud/vm/UserVmManagerImpl.java | 100 +-
.../cloud/vm/snapshot/VMSnapshotManagerImpl.java | 3 +-
.../org/apache/cloudstack/acl/RoleManagerImpl.java | 43 +-
.../annotation/AnnotationManagerImpl.java | 149 ++
.../org/apache/cloudstack/ca/CAManagerImpl.java | 440 ++++++
server/src/org/apache/cloudstack/ha/HAManager.java | 77 +
.../org/apache/cloudstack/ha/HAManagerImpl.java | 714 +++++++++
.../apache/cloudstack/ha/HAResourceCounter.java | 131 ++
.../ha/provider/ActivityCheckerInterface.java | 18 +-
.../cloudstack/ha/provider/HACheckerException.java | 12 +-
.../cloudstack/ha/provider/HAFenceException.java | 12 +-
.../apache/cloudstack/ha/provider/HAProvider.java | 66 +
.../ha/provider/HARecoveryException.java | 11 +-
.../ha/provider/HealthCheckerInterface.java | 17 +-
.../cloudstack/ha/provider/HostHAProvider.java | 6 +-
.../ha/provider/host/HAAbstractHostProvider.java | 109 ++
.../cloudstack/ha/task/ActivityCheckTask.java | 83 +
.../org/apache/cloudstack/ha/task/BaseHATask.java | 111 ++
.../org/apache/cloudstack/ha/task/FenceTask.java | 56 +
.../apache/cloudstack/ha/task/HealthCheckTask.java | 63 +
.../apache/cloudstack/ha/task/RecoveryTask.java | 58 +
.../OutOfBandManagementServiceImpl.java | 14 +-
.../cloudstack/poll/BackgroundPollManagerImpl.java | 6 +-
.../deployment/VpcRouterDeploymentDefinition.java | 14 +-
.../configuration/ConfigurationManagerTest.java | 104 +-
.../cloud/network/CreatePrivateNetworkTest.java | 2 +-
.../com/cloud/network/MockNetworkModelImpl.java | 8 +-
.../cloud/resource/MockResourceManagerImpl.java | 5 +
.../cloud/server/ConfigurationServerImplTest.java | 61 +-
.../cloud/servlet/StaticResourceServletTest.java | 235 ---
.../cloud/storage/VolumeApiServiceImplTest.java | 4 +-
.../cloud/vpc/MockConfigurationManagerImpl.java | 2 +-
.../test/com/cloud/vpc/MockNetworkManagerImpl.java | 11 +-
.../test/com/cloud/vpc/MockNetworkModelImpl.java | 8 +-
.../test/com/cloud/vpc/dao/MockNetworkDaoImpl.java | 9 +-
.../apache/cloudstack/ca/CABackgroundTaskTest.java | 151 ++
.../apache/cloudstack/ca/CAManagerImplTest.java | 121 ++
.../OutOfBandManagementServiceTest.java | 2 +-
.../poll/BackgroundPollManagerImplTest.java | 6 +
.../VpcRouterDeploymentDefinitionTest.java | 26 +-
server/test/resources/db.properties | 2 +-
services/iam/plugin/test/resources/db.properties | 2 +-
.../SecondaryStorageManagerImpl.java | 3 +-
.../resource/NfsSecondaryStorageResource.java | 93 +-
.../storage/template/DownloadManagerImpl.java | 76 +-
setup/bindir/cloud-migrate-databases.in | 2 +-
setup/bindir/cloud-set-guest-sshkey-configdrive.in | 2 +-
setup/bindir/cloud-set-guest-sshkey.in | 4 +-
setup/bindir/cloud-setup-databases.in | 2 +-
setup/bindir/cloud-setup-encryption.in | 10 +-
setup/db/db/schema-41000to41100-cleanup.sql | 4 +
setup/db/db/schema-41000to41100.sql | 173 +++
setup/db/db/schema-481to490-cleanup.sql | 76 -
setup/db/db/schema-481to490.sql | 78 +-
setup/db/db/schema-4930to41000.sql | 2 +-
setup/db/server-setup.sql | 3 +
setup/db/server-setup.xml | 7 +
.../debian/config/opt/cloud/bin/configure.py | 11 +-
.../patches/debian/config/opt/cloud/bin/cs_vmp.py | 12 +-
.../debian/config/opt/cloud/bin/patchsystemvm.sh | 15 +-
systemvm/pom.xml | 5 +
systemvm/systemvm-descriptor.xml | 9 +
test/integration/component/test_host.py | 205 +++
test/integration/component/test_host_ha.py | 289 ++--
test/integration/component/test_host_ha.sh | 86 +-
.../test_separate_backup_from_snapshot.py | 177 +++
test/integration/plugins/nuagevsp/nuageTestCase.py | 33 +-
.../plugins/nuagevsp/nuage_test_data.py | 439 +++---
.../plugins/nuagevsp/nuage_vsp_statistics.py | 202 +++
.../plugins/nuagevsp/test_nuage_static_nat.py | 177 ++-
.../plugins/nuagevsp/test_nuage_vpc_internal_lb.py | 81 +-
.../plugins/nuagevsp/test_nuage_vpc_network.py | 13 +-
.../integration/plugins/nuagevsp/test_nuage_vsp.py | 11 +-
test/integration/smoke/test_certauthority_root.py | 229 +++
test/integration/smoke/test_host_annotations.py | 178 +++
test/integration/smoke/test_hostha_kvm.py | 626 ++++++++
test/integration/smoke/test_hostha_simulator.py | 776 ++++++++++
test/integration/smoke/test_iso.py | 178 ++-
test/integration/smoke/test_nic.py | 175 +++
.../smoke/test_outofbandmanagement_nestedplugin.py | 256 +++
test/integration/smoke/test_portforwardingrules.py | 428 +++++
test/integration/smoke/test_primary_storage.py | 113 +-
test/integration/smoke/test_staticroles.py | 2 +-
test/integration/smoke/test_templates.py | 199 +++
.../testpaths/testpath_delta_snapshots.py | 540 +++++++
tools/apidoc/build-apidoc.sh | 2 +-
tools/apidoc/gen_toc.py | 8 +-
tools/apidoc/pom.xml | 4 +-
tools/build/build_asf.sh | 8 +-
tools/docker/supervisord.conf | 2 +-
tools/eclipse/eclipse.epf | 2 +-
tools/marvin/marvin/codes.py | 1 +
tools/marvin/marvin/config/test_data.py | 13 +-
tools/marvin/marvin/lib/base.py | 40 +-
tools/marvin/setup.py | 2 +-
tools/travis/before_install.sh | 7 +-
tools/travis/install.sh | 2 +-
tools/travis/script.sh | 1 +
ui/css/cloudstack3.css | 59 +
ui/images/sprites.png | Bin 198421 -> 207062 bytes
ui/index.html | 1 +
ui/l10n/en.js | 13 +
ui/plugins/cloudian/cloudian.css | 18 +
ui/plugins/cloudian/cloudian.js | 66 +
.../plugins/cloudian/config.js | 14 +-
ui/plugins/cloudian/icon.png | Bin 0 -> 1099 bytes
ui/plugins/plugins.js | 1 +
ui/scripts/configuration.js | 80 +
ui/scripts/dashboard.js | 2 +-
ui/scripts/domains.js | 2 +
ui/scripts/instances.js | 1 +
ui/scripts/storage.js | 7 +-
ui/scripts/system.js | 539 +++++--
ui/scripts/ui-custom/ca.js | 53 +
ui/scripts/ui-custom/saml.js | 5 +-
ui/scripts/vpc.js | 15 +-
usage/pom.xml | 2 +-
usage/src/com/cloud/usage/UsageServer.java | 31 +-
.../com/cloud/usage/parser/StorageUsageParser.java | 7 +-
usage/test/resources/db.properties | 2 +-
utils/conf/db.properties | 2 +-
utils/pom.xml | 21 +-
.../main/java/com/cloud/utils/PropertiesUtil.java | 4 -
.../java/com/cloud/utils/SerialVersionUID.java | 1 +
.../src/main/java/com/cloud/utils/StringUtils.java | 8 +
utils/src/main/java/com/cloud/utils/UriUtils.java | 50 +
.../utils/exception/TaskExecutionException.java | 2 +-
.../main/java/com/cloud/utils/net/NetUtils.java | 27 +
utils/src/main/java/com/cloud/utils/nio/Link.java | 185 +--
.../main/java/com/cloud/utils/nio/NioClient.java | 2 +-
.../java/com/cloud/utils/nio/NioConnection.java | 27 +-
.../main/java/com/cloud/utils/nio/NioServer.java | 4 +-
.../main/java/com/cloud/utils/script/Script.java | 3 +-
.../java/com/cloud/utils/ssh/SSHCmdHelper.java | 93 +-
.../cloudstack/utils/security/CertUtils.java | 252 +++
.../cloudstack/utils/security/ChecksumValue.java | 86 +
.../cloudstack/utils/security/DigestHelper.java | 96 ++
.../cloudstack/utils/security/KeyStoreUtils.java | 41 +
.../test/java/com/cloud/utils/StringUtilsTest.java | 13 +
.../test/java/com/cloud/utils/UriUtilsTest.java | 46 +-
.../java/com/cloud/utils/net/NetUtilsTest.java | 18 +
.../java/com/cloud/utils/testcase/NioTest.java | 2 +-
.../cloudstack/utils/security/CertUtilsTest.java | 118 ++
.../utils/security/DigestHelperTest.java | 102 ++
vmware-base/pom.xml | 5 +
.../cloud/hypervisor/vmware/mo/DatastoreMO.java | 28 +-
.../hypervisor/vmware/mo/HypervisorHostHelper.java | 283 +++-
.../hypervisor/vmware/mo/VirtualMachineMO.java | 43 +-
.../cloud/hypervisor/vmware/util/VmwareHelper.java | 17 +-
.../hypervisor/vmware/mo/DatastoreMOTest.java | 114 ++
.../vmware/mo/HypervisorHostHelperTest.java | 139 +-
.../hypervisor/vmware/mo/VirtualMachineMOTest.java | 120 ++
585 files changed, 24518 insertions(+), 16011 deletions(-)
copy api/src/{com/cloud/storage/ImageStore.java => org/apache/cloudstack/annotation/Annotation.java} (68%)
create mode 100644 api/src/org/apache/cloudstack/annotation/AnnotationService.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/annotation/AddAnnotationCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/annotation/ListAnnotationsCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/annotation/RemoveAnnotationCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ca/IssueCertificateCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ca/ListCAProvidersCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ca/ListCaCertificateCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ca/ProvisionCertificateCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ca/RevokeCertificateCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ha/ConfigureHAForHostCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ha/DisableHAForClusterCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ha/DisableHAForHostCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ha/DisableHAForZoneCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ha/EnableHAForClusterCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ha/EnableHAForHostCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ha/EnableHAForZoneCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ha/ListHostHAProvidersCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/command/admin/ha/ListHostHAResourcesCmd.java
create mode 100644 api/src/org/apache/cloudstack/api/response/AnnotationResponse.java
create mode 100644 api/src/org/apache/cloudstack/api/response/CAProviderResponse.java
create mode 100644 api/src/org/apache/cloudstack/api/response/CertificateResponse.java
create mode 100644 api/src/org/apache/cloudstack/api/response/HAProviderResponse.java
create mode 100644 api/src/org/apache/cloudstack/api/response/HostHAResponse.java
create mode 100644 api/src/org/apache/cloudstack/ca/CAManager.java
create mode 100644 api/src/org/apache/cloudstack/ha/HAConfig.java
create mode 100644 api/src/org/apache/cloudstack/ha/HAConfigManager.java
copy api/src/org/apache/cloudstack/{poll/BackgroundPollTask.java => ha/HAResource.java} (68%)
copy api/src/org/apache/cloudstack/{poll/BackgroundPollTask.java => kernel/Partition.java} (72%)
copy engine/storage/src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreDao.java => api/test/org/apache/cloudstack/api/command/admin/annotation/AddAnnotationCmdTest.java (56%)
rename client/{tomcatconf => conf}/commons-logging.properties.in (97%)
rename client/{tomcatconf => conf}/db.properties.in (97%)
rename client/{tomcatconf => conf}/ehcache.xml.in (98%)
rename client/{tomcatconf => conf}/environment.properties.in (99%)
rename client/{tomcatconf => conf}/java.security.ciphers.in (100%)
rename client/{tomcatconf => conf}/log4j-cloud.xml.in (99%)
copy tools/travis/script.sh => client/conf/server.properties.in (50%)
mode change 100755 => 100644
delete mode 100755 client/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-management.in
delete mode 100644 client/distro/centos/SYSCONFDIR/sysconfig/cloud-management.in
delete mode 100755 client/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-management.in
delete mode 100644 client/distro/fedora/SYSCONFDIR/sysconfig/cloud-management.in
delete mode 100755 client/distro/opensuse/SYSCONFDIR/init.d/cloud-management.in
delete mode 100644 client/distro/opensuse/SYSCONFDIR/sysconfig/cloud-management.in
delete mode 100644 client/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-management.in
delete mode 100644 client/distro/rhel/SYSCONFDIR/sysconfig/cloud-management.in
delete mode 100755 client/distro/sles/SYSCONFDIR/init.d/cloud-management.in
delete mode 100644 client/distro/sles/SYSCONFDIR/sysconfig/cloud-management.in
delete mode 100755 client/distro/ubuntu/SYSCONFDIR/init.d/cloud-management.in
create mode 100644 client/src/org/apache/cloudstack/ServerDaemon.java
delete mode 100644 client/tomcatconf/catalina.policy.in
delete mode 100644 client/tomcatconf/catalina.properties.in
delete mode 100644 client/tomcatconf/classpath.conf.in
delete mode 100644 client/tomcatconf/cloudmanagementserver.keystore
delete mode 100644 client/tomcatconf/context.xml.in
delete mode 100644 client/tomcatconf/logging.properties.in
delete mode 100755 client/tomcatconf/server-nonssl.xml.in
delete mode 100755 client/tomcatconf/server-ssl.xml.in
delete mode 100755 client/tomcatconf/server7-nonssl.xml.in
delete mode 100755 client/tomcatconf/server7-ssl.xml.in
delete mode 100644 client/tomcatconf/tomcat-users.xml.in
delete mode 100644 client/tomcatconf/tomcat6-nonssl.conf.in
delete mode 100644 client/tomcatconf/tomcat6-ssl.conf.in
delete mode 100644 client/tomcatconf/web.xml.in
rename packaging/centos63/tomcat.sh => core/resources/META-INF/cloudstack/ca/module.properties (95%)
copy core/resources/META-INF/cloudstack/{compute/spring-core-lifecycle-compute-context-inheritable.xml => ca/spring-core-lifecycle-ca-context-inheritable.xml} (52%)
create mode 100644 core/src/com/cloud/agent/api/CheckVMActivityOnStoragePoolCommand.java
copy api/src/org/apache/cloudstack/poll/BackgroundPollTask.java => core/src/org/apache/cloudstack/ca/SetupCertificateAnswer.java (76%)
create mode 100644 core/src/org/apache/cloudstack/ca/SetupCertificateCommand.java
create mode 100644 core/src/org/apache/cloudstack/ca/SetupKeyStoreCommand.java
copy api/src/org/apache/cloudstack/poll/BackgroundPollTask.java => core/src/org/apache/cloudstack/ca/SetupKeystoreAnswer.java (64%)
mode change 100644 => 100755 debian/cloudstack-agent.postinst
mode change 100644 => 100755 debian/cloudstack-management.postinst
rename packaging/fedora21/cloudstack-sccs => debian/cloudstack-management.preinst (65%)
mode change 100644 => 100755
mode change 100644 => 100755 debian/cloudstack-marvin.postinst
mode change 100644 => 100755 debian/cloudstack-usage.postinst
create mode 100644 engine/schema/src/com/cloud/certificate/CrlVO.java
copy api/src/org/apache/cloudstack/poll/BackgroundPollTask.java => engine/schema/src/com/cloud/certificate/dao/CrlDao.java (70%)
create mode 100644 engine/schema/src/com/cloud/certificate/dao/CrlDaoImpl.java
create mode 100644 engine/schema/src/org/apache/cloudstack/annotation/AnnotationVO.java
copy api/src/org/apache/cloudstack/poll/BackgroundPollTask.java => engine/schema/src/org/apache/cloudstack/annotation/dao/AnnotationDao.java (66%)
create mode 100644 engine/schema/src/org/apache/cloudstack/annotation/dao/AnnotationDaoImpl.java
copy engine/schema/src/org/apache/cloudstack/{outofbandmanagement/OutOfBandManagementVO.java => ha/HAConfigVO.java} (55%)
copy engine/{api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java => schema/src/org/apache/cloudstack/ha/dao/HAConfigDao.java} (56%)
create mode 100644 engine/schema/src/org/apache/cloudstack/ha/dao/HAConfigDaoImpl.java
rename engine/storage/{src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreDao.java => snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotBackupException.java} (56%)
delete mode 100644 engine/storage/src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreDaoImpl.java
delete mode 100644 engine/storage/src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreVO.java
copy {plugins/network-elements/globodns => framework/ca}/pom.xml (65%)
create mode 100644 framework/ca/src/org/apache/cloudstack/framework/ca/CAProvider.java
create mode 100644 framework/ca/src/org/apache/cloudstack/framework/ca/CAService.java
copy core/src/com/cloud/agent/api/ComputeChecksumCommand.java => framework/ca/src/org/apache/cloudstack/framework/ca/Certificate.java (50%)
delete mode 100644 packaging/centos63/cloud-management.sysconfig
delete mode 100644 packaging/centos7/tomcat7/catalina.properties
delete mode 100644 packaging/centos7/tomcat7/commons-logging.properties
delete mode 100644 packaging/centos7/tomcat7/db.properties
delete mode 100644 packaging/centos7/tomcat7/environment.properties
delete mode 100644 packaging/centos7/tomcat7/java.security.ciphers
delete mode 100644 packaging/centos7/tomcat7/log4j-cloud.xml
delete mode 100644 packaging/centos7/tomcat7/server.xml
delete mode 100644 packaging/centos7/tomcat7/tomcat-users.xml
delete mode 100644 packaging/centos7/tomcat7/web.xml
delete mode 100755 packaging/fedora20/cloud-agent.rc
delete mode 100755 packaging/fedora20/cloud-ipallocator.rc
delete mode 100755 packaging/fedora20/cloud-management.rc
delete mode 100644 packaging/fedora20/cloud-management.sysconfig
delete mode 100755 packaging/fedora20/cloud-usage.rc
delete mode 100644 packaging/fedora20/cloud.spec
delete mode 100644 packaging/fedora20/cloudstack-agent.te
delete mode 100644 packaging/fedora20/cloudstack-sccs
delete mode 100644 packaging/fedora20/replace.properties
delete mode 100755 packaging/fedora21/cloud-agent.rc
delete mode 100755 packaging/fedora21/cloud-ipallocator.rc
delete mode 100755 packaging/fedora21/cloud-management.rc
delete mode 100644 packaging/fedora21/cloud-management.sysconfig
delete mode 100755 packaging/fedora21/cloud-usage.rc
delete mode 100644 packaging/fedora21/cloud.spec
delete mode 100644 packaging/fedora21/cloudstack-agent.te
delete mode 100644 packaging/fedora21/replace.properties
delete mode 100644 packaging/systemd/cloudstack-management.default.ubuntu
delete mode 100644 packaging/systemd/cloudstack-management.service.ubuntu
rename plugins/{network-elements/midonet => ca/root-ca}/pom.xml (62%)
rename packaging/fedora21/tomcat.sh => plugins/ca/root-ca/resources/META-INF/cloudstack/root-ca/module.properties (97%)
rename plugins/{network-elements/midonet/resources/META-INF/cloudstack/midonet/spring-midonet-context.xml => ca/root-ca/resources/META-INF/cloudstack/root-ca/spring-root-ca-context.xml} (58%)
create mode 100644 plugins/ca/root-ca/src/org/apache/cloudstack/ca/provider/RootCACustomTrustManager.java
create mode 100644 plugins/ca/root-ca/src/org/apache/cloudstack/ca/provider/RootCAProvider.java
create mode 100644 plugins/ca/root-ca/test/org/apache/cloudstack/ca/provider/RootCACustomTrustManagerTest.java
create mode 100644 plugins/ca/root-ca/test/org/apache/cloudstack/ca/provider/RootCAProviderTest.java
create mode 100644 plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAVMActivityChecker.java
create mode 100644 plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtCheckVMActivityOnStoragePoolCommandWrapper.java
create mode 100644 plugins/hypervisors/kvm/src/org/apache/cloudstack/kvm/ha/KVMHAConfig.java
create mode 100644 plugins/hypervisors/kvm/src/org/apache/cloudstack/kvm/ha/KVMHAProvider.java
create mode 100644 plugins/hypervisors/kvm/src/org/apache/cloudstack/kvm/ha/KVMHostActivityChecker.java
create mode 100644 plugins/hypervisors/kvm/test/org/apache/cloudstack/kvm/ha/KVMHostHATest.java
create mode 100644 plugins/hypervisors/simulator/src/com/cloud/api/commands/ConfigureSimulatorHAProviderState.java
create mode 100644 plugins/hypervisors/simulator/src/com/cloud/api/commands/ListSimulatorHAStateTransitions.java
create mode 100644 plugins/hypervisors/simulator/src/com/cloud/api/response/SimulatorHAStateResponse.java
create mode 100644 plugins/hypervisors/simulator/src/org/apache/cloudstack/ha/SimulatorHAProvider.java
create mode 100644 plugins/hypervisors/simulator/src/org/apache/cloudstack/ha/SimulatorHAState.java
create mode 100644 plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/CleanupFullyClonedTemplatesTask.java
copy {api => plugins/integrations/cloudian}/pom.xml (56%)
rename packaging/fedora20/tomcat.sh => plugins/integrations/cloudian/resources/META-INF/cloudstack/cloudian/module.properties (96%)
copy plugins/{hypervisors/kvm/resources/META-INF/cloudstack/kvm-compute/spring-kvm-compute-context.xml => integrations/cloudian/resources/META-INF/cloudstack/cloudian/spring-cloudian-context.xml} (64%)
create mode 100644 plugins/integrations/cloudian/src/org/apache/cloudstack/cloudian/CloudianConnector.java
create mode 100644 plugins/integrations/cloudian/src/org/apache/cloudstack/cloudian/CloudianConnectorImpl.java
create mode 100644 plugins/integrations/cloudian/src/org/apache/cloudstack/cloudian/api/CloudianIsEnabledCmd.java
create mode 100644 plugins/integrations/cloudian/src/org/apache/cloudstack/cloudian/api/CloudianSsoLoginCmd.java
create mode 100644 plugins/integrations/cloudian/src/org/apache/cloudstack/cloudian/client/CloudianClient.java
copy core/src/com/cloud/agent/api/ComputeChecksumCommand.java => plugins/integrations/cloudian/src/org/apache/cloudstack/cloudian/client/CloudianGroup.java (50%)
create mode 100644 plugins/integrations/cloudian/src/org/apache/cloudstack/cloudian/client/CloudianUser.java
create mode 100644 plugins/integrations/cloudian/src/org/apache/cloudstack/cloudian/client/CloudianUtils.java
copy core/src/com/cloud/agent/api/ComputeChecksumCommand.java => plugins/integrations/cloudian/src/org/apache/cloudstack/cloudian/response/CloudianEnabledResponse.java (53%)
copy engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotStrategy.java => plugins/integrations/cloudian/src/org/apache/cloudstack/cloudian/response/CloudianSsoLoginResponse.java (60%)
create mode 100644 plugins/integrations/cloudian/test/org/apache/cloudstack/cloudian/CloudianClientTest.java
copy plugins/{event-bus/rabbitmq => integrations/prometheus}/pom.xml (66%)
copy plugins/{network-elements/midonet/resources/META-INF/cloudstack/midonet => integrations/prometheus/resources/META-INF/cloudstack/prometheus}/module.properties (96%)
copy plugins/{hypervisors/kvm/resources/META-INF/cloudstack/kvm-compute/spring-kvm-compute-context.xml => integrations/prometheus/resources/META-INF/cloudstack/prometheus/spring-prometheus-context.xml} (63%)
copy api/src/org/apache/cloudstack/poll/BackgroundPollTask.java => plugins/integrations/prometheus/src/org/apache/cloudstack/metrics/PrometheusExporter.java (86%)
create mode 100644 plugins/integrations/prometheus/src/org/apache/cloudstack/metrics/PrometheusExporterImpl.java
create mode 100644 plugins/integrations/prometheus/src/org/apache/cloudstack/metrics/PrometheusExporterServer.java
create mode 100644 plugins/integrations/prometheus/src/org/apache/cloudstack/metrics/PrometheusExporterServerImpl.java
delete mode 100644 plugins/network-elements/midonet/src/com/cloud/network/element/MidoNetElement.java
delete mode 100644 plugins/network-elements/midonet/src/com/cloud/network/element/SimpleFirewallRule.java
delete mode 100644 plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java
delete mode 100644 plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java
delete mode 100644 plugins/network-elements/midonet/src/com/cloud/network/resource/MidoNetVifDriver.java
delete mode 100644 plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java
copy utils/src/main/java/com/cloud/utils/exception/TaskExecutionException.java => plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/manager/ImplementNetworkVspAnswer.java (52%)
create mode 100644 plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/AbstractListener.java
create mode 100644 plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/VspStatisticsMBean.java
create mode 100644 plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/VspStatisticsMBeanImpl.java
copy plugins/{event-bus/kafka => outofbandmanagement-drivers/nested-cloudstack}/pom.xml (63%)
rename plugins/{network-elements/midonet/resources/META-INF/cloudstack/midonet => outofbandmanagement-drivers/nested-cloudstack/resources/META-INF/cloudstack/nested-cloudstack}/module.properties (94%)
copy plugins/{hypervisors/kvm/resources/META-INF/cloudstack/kvm-compute/spring-kvm-compute-context.xml => outofbandmanagement-drivers/nested-cloudstack/resources/META-INF/cloudstack/nested-cloudstack/spring-nested-cloudstack-context.xml} (64%)
create mode 100644 plugins/outofbandmanagement-drivers/nested-cloudstack/src/org/apache/cloudstack/outofbandmanagement/driver/nestedcloudstack/NestedCloudStackOutOfBandManagementDriver.java
create mode 100644 plugins/outofbandmanagement-drivers/nested-cloudstack/test/org/apache/cloudstack/outofbandmanagement/driver/nestedcloudstack/NestedCloudStackOutOfBandManagementDriverTest.java
create mode 100644 plugins/storage/volume/default/test/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImplTest.java
delete mode 100644 scripts/common/keys/ssl-keys.py
create mode 100755 scripts/util/keystore-cert-import
create mode 100755 scripts/util/keystore-setup
create mode 100755 scripts/vm/hypervisor/kvm/kvmvmactivity.sh
delete mode 100644 server/src/com/cloud/servlet/StaticResourceServlet.java
mode change 100755 => 100644 server/src/com/cloud/vm/UserVmManagerImpl.java
create mode 100644 server/src/org/apache/cloudstack/annotation/AnnotationManagerImpl.java
create mode 100644 server/src/org/apache/cloudstack/ca/CAManagerImpl.java
create mode 100644 server/src/org/apache/cloudstack/ha/HAManager.java
create mode 100644 server/src/org/apache/cloudstack/ha/HAManagerImpl.java
create mode 100644 server/src/org/apache/cloudstack/ha/HAResourceCounter.java
copy api/src/org/apache/cloudstack/poll/BackgroundPollTask.java => server/src/org/apache/cloudstack/ha/provider/ActivityCheckerInterface.java (64%)
copy api/src/org/apache/cloudstack/poll/BackgroundPollTask.java => server/src/org/apache/cloudstack/ha/provider/HACheckerException.java (76%)
copy api/src/org/apache/cloudstack/poll/BackgroundPollTask.java => server/src/org/apache/cloudstack/ha/provider/HAFenceException.java (77%)
create mode 100644 server/src/org/apache/cloudstack/ha/provider/HAProvider.java
copy api/src/org/apache/cloudstack/poll/BackgroundPollTask.java => server/src/org/apache/cloudstack/ha/provider/HARecoveryException.java (76%)
copy api/src/org/apache/cloudstack/poll/BackgroundPollTask.java => server/src/org/apache/cloudstack/ha/provider/HealthCheckerInterface.java (67%)
copy api/src/org/apache/cloudstack/poll/BackgroundPollTask.java => server/src/org/apache/cloudstack/ha/provider/HostHAProvider.java (86%)
create mode 100644 server/src/org/apache/cloudstack/ha/provider/host/HAAbstractHostProvider.java
create mode 100644 server/src/org/apache/cloudstack/ha/task/ActivityCheckTask.java
create mode 100644 server/src/org/apache/cloudstack/ha/task/BaseHATask.java
create mode 100644 server/src/org/apache/cloudstack/ha/task/FenceTask.java
create mode 100644 server/src/org/apache/cloudstack/ha/task/HealthCheckTask.java
create mode 100644 server/src/org/apache/cloudstack/ha/task/RecoveryTask.java
delete mode 100644 server/test/com/cloud/servlet/StaticResourceServletTest.java
create mode 100644 server/test/org/apache/cloudstack/ca/CABackgroundTaskTest.java
create mode 100644 server/test/org/apache/cloudstack/ca/CAManagerImplTest.java
create mode 100644 test/integration/component/test_host.py
create mode 100644 test/integration/component/test_separate_backup_from_snapshot.py
copy tools/marvin/marvin/config/test_data.py => test/integration/plugins/nuagevsp/nuage_test_data.py (87%)
create mode 100644 test/integration/plugins/nuagevsp/nuage_vsp_statistics.py
create mode 100644 test/integration/smoke/test_certauthority_root.py
create mode 100644 test/integration/smoke/test_host_annotations.py
create mode 100644 test/integration/smoke/test_hostha_kvm.py
create mode 100644 test/integration/smoke/test_hostha_simulator.py
create mode 100644 test/integration/smoke/test_outofbandmanagement_nestedplugin.py
create mode 100644 test/integration/smoke/test_portforwardingrules.py
create mode 100644 test/integration/testpaths/testpath_delta_snapshots.py
create mode 100644 ui/plugins/cloudian/cloudian.css
create mode 100644 ui/plugins/cloudian/cloudian.js
copy api/src/org/apache/cloudstack/poll/BackgroundPollTask.java => ui/plugins/cloudian/config.js (75%)
create mode 100644 ui/plugins/cloudian/icon.png
create mode 100644 ui/scripts/ui-custom/ca.js
create mode 100644 utils/src/main/java/org/apache/cloudstack/utils/security/CertUtils.java
create mode 100644 utils/src/main/java/org/apache/cloudstack/utils/security/ChecksumValue.java
create mode 100644 utils/src/main/java/org/apache/cloudstack/utils/security/DigestHelper.java
create mode 100644 utils/src/main/java/org/apache/cloudstack/utils/security/KeyStoreUtils.java
create mode 100644 utils/src/test/java/org/apache/cloudstack/utils/security/CertUtilsTest.java
create mode 100644 utils/src/test/java/org/apache/cloudstack/utils/security/DigestHelperTest.java
create mode 100644 vmware-base/test/com/cloud/hypervisor/vmware/mo/DatastoreMOTest.java
create mode 100644 vmware-base/test/com/cloud/hypervisor/vmware/mo/VirtualMachineMOTest.java
--
To stop receiving notification emails like this one, please contact
['"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>'].
[cloudstack] 01/07: CLOUDSTACK-10013: Migrate systemvmtemplate to
Debian9
Posted by bh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit ea95fa20a2dd3be8535fc06556be6ae7b8146612
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Sun Jul 23 18:01:35 2017 +0200
CLOUDSTACK-10013: Migrate systemvmtemplate to Debian9
SystemVM changes to work on Debian 9
- Migrate away from chkconfig to systemctl
- Remove xenstore-utils override deb pkg
- Fix runlevel in sysv scripts for systemd
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
systemvm/patches/debian/buildsystemvm.sh | 577 ---------------------
systemvm/patches/debian/config/etc/init.d/cloud | 10 +-
.../debian/config/etc/init.d/cloud-early-config | 23 +-
.../debian/config/etc/init.d/cloud-passwd-srvr | 10 +-
systemvm/patches/debian/config/etc/init.d/postinit | 6 +-
systemvm/patches/debian/config/etc/rc.local | 2 +-
systemvm/patches/debian/config/etc/ssh/sshd_config | 1 -
.../debian/config/opt/cloud/bin/patchsystemvm.sh | 128 ++---
tools/appliance/build.sh | 2 +-
.../definitions/systemvmtemplate/apt_upgrade.sh | 9 +-
.../systemvmtemplate/authorized_keys.sh | 1 +
.../definitions/systemvmtemplate/build_time.sh | 26 -
.../definitions/systemvmtemplate/cleanup.sh | 1 -
.../definitions/systemvmtemplate/configure_grub.sh | 6 +-
.../systemvmtemplate/configure_login.sh | 15 +-
.../systemvmtemplate/configure_networking.sh | 25 +-
.../configure_systemvm_services.sh | 94 +++-
.../definitions/systemvmtemplate/definition.rb | 36 +-
.../systemvmtemplate/install_systemvm_packages.sh | 32 +-
.../definitions/systemvmtemplate/preseed.cfg | 69 ++-
.../definitions/systemvmtemplate/zerodisk.sh | 9 +-
21 files changed, 267 insertions(+), 815 deletions(-)
diff --git a/systemvm/patches/debian/buildsystemvm.sh b/systemvm/patches/debian/buildsystemvm.sh
deleted file mode 100755
index a34b1dd..0000000
--- a/systemvm/patches/debian/buildsystemvm.sh
+++ /dev/null
@@ -1,577 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# 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
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-echo "####################################################"
-echo " Note there is a new systemvm build script based on "
-echo " Veewee(Vagrant) under tools/appliance."
-echo "####################################################"
-
-set -e
-set -x
-
-IMAGENAME=systemvm
-LOCATION=/var/lib/images/systemvm
-PASSWORD=password
-#APT_PROXY=192.168.1.115:3142/
-APT_PROXY=
-HOSTNAME=systemvm
-SIZE=2000
-DEBIAN_MIRROR=ftp.us.debian.org/debian
-MINIMIZE=true
-CLOUDSTACK_RELEASE=4.0
-offset=4096
-baseimage() {
- mkdir -p $LOCATION
- #dd if=/dev/zero of=$IMAGELOC bs=1M count=$SIZE
- dd if=/dev/zero of=$IMAGELOC bs=1M seek=$((SIZE - 1)) count=1
- loopdev=$(losetup -f)
- losetup $loopdev $IMAGELOC
- parted $loopdev -s 'mklabel msdos'
- parted $loopdev -s 'mkpart primary ext3 4096B -1'
- sleep 2
- losetup -d $loopdev
- loopdev=$(losetup --show -o $offset -f $IMAGELOC )
- mkfs.ext3 -L ROOT $loopdev
- mkdir -p $MOUNTPOINT
- tune2fs -c 100 -i 0 $loopdev
- sleep 2
- losetup -d $loopdev
-
- mount -o loop,offset=$offset $IMAGELOC $MOUNTPOINT
-
- #debootstrap --variant=minbase --keyring=/usr/share/keyrings/debian-archive-keyring.gpg wheezy $MOUNTPOINT http://${APT_PROXY}${DEBIAN_MIRROR}
- debootstrap --variant=minbase --arch=i386 wheezy $MOUNTPOINT http://${APT_PROXY}${DEBIAN_MIRROR}
-}
-
-
-fixapt() {
- if [ "$APT_PROXY" != "" ]; then
- cat >> etc/apt/apt.conf.d/01proxy << EOF
-Acquire::http::Proxy "http://${APT_PROXY}";
-EOF
- fi
-
- cat > etc/apt/sources.list << EOF
-deb http://http.debian.net/debian/ wheezy main contrib non-free
-deb-src http://http.debian.net/debian/ wheezy main contrib non-free
-
-deb http://security.debian.org/ wheezy/updates main
-deb-src http://security.debian.org/ wheezy/updates main
-
-deb http://http.debian.net/debian/ wheezy-backports main
-deb-src http://http.debian.net/debian/ wheezy-backports main
-EOF
-
- cat >> etc/apt/apt.conf << EOF
-APT::Default-Release "stable";
-EOF
-
- cat >> etc/apt/preferences << EOF
-Package: *
-Pin: release o=Debian,a=stable
-Pin-Priority: 900
-EOF
-
- #apt-key exportall | chroot . apt-key add - &&
- chroot . apt-get update &&
- echo "Apt::Install-Recommends 0;" > etc/apt/apt.conf.d/local-recommends
-
- cat >> usr/sbin/policy-rc.d << EOF
-#!/bin/sh
-exit 101
-EOF
- chmod a+x usr/sbin/policy-rc.d
-
- cat >> etc/default/locale << EOF
-LANG=en_US.UTF-8
-LC_ALL=en_US.UTF-8
-EOF
-
- cat >> etc/locale.gen << EOF
-en_US.UTF-8 UTF-8
-EOF
-
- DEBIAN_FRONTEND=noninteractive
- DEBIAN_PRIORITY=critical
- export DEBIAN_FRONTEND DEBIAN_PRIORITY
- chroot . dpkg-reconfigure debconf --frontend=noninteractive
- chroot . apt-get -q -y install locales
-}
-
-network() {
-
- echo "$HOSTNAME" > etc/hostname &&
- cat > etc/hosts << EOF
-127.0.0.1 localhost
-# The following lines are desirable for IPv6 capable hosts
-::1 localhost ip6-localhost ip6-loopback
-fe00::0 ip6-localnet
-ff00::0 ip6-mcastprefix
-ff02::1 ip6-allnodes
-ff02::2 ip6-allrouters
-ff02::3 ip6-allhosts
-EOF
-
- cat >> etc/network/interfaces << EOF
-auto lo eth0
-iface lo inet loopback
-
-# The primary network interface
-iface eth0 inet static
-
-EOF
-}
-
-install_kernel() {
- DEBIAN_FRONTEND=noninteractive
- DEBIAN_PRIORITY=critical
- export DEBIAN_FRONTEND DEBIAN_PRIORITY
-
- chroot . apt-get -qq -y --force-yes install grub-legacy &&
- cp -av usr/lib/grub/i386-pc boot/grub
- #for some reason apt-get install grub does not install grub/stage1 etc
- #loopd=$(losetup -f --show $1)
- #grub-install $loopd --root-directory=$MOUNTPOINT
- #losetup -d $loopd
- grub << EOF &&
-device (hd0) $1
-root (hd0,0)
-setup (hd0)
-quit
-EOF
- # install a kernel image
- cat > etc/kernel-img.conf << EOF &&
-do_symlinks = yes
-link_in_boot = yes
-do_initrd = yes
-EOF
- touch /mnt/systemvm/boot/grub/default
- chroot . apt-get install -qq -y --force-yes linux-image-686-bigmem
- cat >> etc/kernel-img.conf << EOF
-postinst_hook = /usr/sbin/update-grub
-postrm_hook = /usr/sbin/update-grub
-EOF
-}
-
-
-fixgrub() {
- kern=$(basename $(ls boot/vmlinuz-*))
- ver=${kern#vmlinuz-}
- cat > boot/grub/menu.lst << EOF
-default 0
-timeout 2
-color cyan/blue white/blue
-
-### BEGIN AUTOMAGIC KERNELS LIST
-# kopt=root=LABEL=ROOT ro
-
-## ## End Default Options ##
-title Debian GNU/Linux, kernel $ver
-root (hd0,0)
-kernel /boot/$kern root=LABEL=ROOT ro console=tty0 xencons=ttyS0,115200 console=hvc0 quiet
-initrd /boot/initrd.img-$ver
-
-### END DEBIAN AUTOMAGIC KERNELS LIST
-EOF
- (cd boot/grub; ln -s menu.lst grub.conf)
-}
-
-fixinittab() {
- cat >> etc/inittab << EOF
-
-vc:2345:respawn:/sbin/getty 38400 hvc0
-EOF
-}
-
-fixfstab() {
- cat > etc/fstab << EOF
-# <file system> <mount point> <type> <options> <dump> <pass>
-proc /proc proc defaults 0 0
-LABEL=ROOT / ext3 errors=remount-ro,sync,noatime 0 1
-EOF
-}
-
-fixacpid() {
- mkdir -p etc/acpi/events
- cat >> etc/acpi/events/power << EOF
-event=button/power.*
-action=/usr/local/sbin/power.sh "%e"
-EOF
- cat >> usr/local/sbin/power.sh << EOF
-#!/bin/bash
-/sbin/poweroff
-EOF
- chmod a+x usr/local/sbin/power.sh
-}
-
-fixiptables() {
-cat >> etc/modules << EOF
-nf_conntrack
-nf_conntrack_ipv4
-EOF
-cat > etc/init.d/iptables-persistent << EOF
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: iptables
-# Required-Start: mountkernfs $local_fs
-# Required-Stop: $local_fs
-# Should-Start: cloud-early-config
-# Default-Start: S
-# Default-Stop:
-# Short-Description: Set up iptables rules
-### END INIT INFO
-
-PATH="/sbin:/bin:/usr/sbin:/usr/bin"
-
-# Include config file for iptables-persistent
-. /etc/iptables/iptables.conf
-
-case "\$1" in
-start)
- if [ -e /var/run/iptables ]; then
- echo "iptables is already started!"
- exit 1
- else
- touch /var/run/iptables
- fi
-
- if [ \$ENABLE_ROUTING -ne 0 ]; then
- # Enable Routing
- echo 1 > /proc/sys/net/ipv4/ip_forward
- fi
-
- # Load Modules
- modprobe -a \$MODULES
-
- # Load saved rules
- if [ -f /etc/iptables/rules ]; then
- iptables-restore </etc/iptables/rules
- fi
- ;;
-stop|force-stop)
- if [ ! -e /var/run/iptables ]; then
- echo "iptables is already stopped!"
- exit 1
- else
- rm /var/run/iptables
- fi
-
- if [ \$SAVE_NEW_RULES -ne 0 ]; then
- # Backup old rules
- cp /etc/iptables/rules /etc/iptables/rules.bak
- # Save new rules
- iptables-save >/etc/iptables/rules
- fi
-
- # Restore Default Policies
- iptables -P INPUT ACCEPT
- iptables -P FORWARD ACCEPT
- iptables -P OUTPUT ACCEPT
-
- # Flush rules on default tables
- iptables -F
- iptables -t nat -F
- iptables -t mangle -F
-
- # Unload previously loaded modules
- modprobe -r \$MODULES
-
- # Disable Routing if enabled
- if [ \$ENABLE_ROUTING -ne 0 ]; then
- # Disable Routing
- echo 0 > /proc/sys/net/ipv4/ip_forward
- fi
-
- ;;
-restart|force-reload)
- \$0 stop
- \$0 start
- ;;
-status)
- echo "Filter Rules:"
- echo "--------------"
- iptables -L -v
- echo ""
- echo "NAT Rules:"
- echo "-------------"
- iptables -t nat -L -v
- echo ""
- echo "Mangle Rules:"
- echo "----------------"
- iptables -t mangle -L -v
- ;;
-*)
- echo "Usage: \$0 {start|stop|force-stop|restart|force-reload|status}" >&2
- exit 1
- ;;
-esac
-
-exit 0
-EOF
- chmod a+x etc/init.d/iptables-persistent
-
-
- touch etc/iptables/iptables.conf
- cat > etc/iptables/iptables.conf << EOF
-# A basic config file for the /etc/init.d/iptable-persistent script
-
-# Should new manually added rules from command line be saved on reboot? Assign to a value different that 0 if you want this enabled.
-SAVE_NEW_RULES=0
-
-# Modules to load:
-MODULES="nf_nat_ftp nf_conntrack_ftp"
-
-# Enable Routing?
-ENABLE_ROUTING=1
-EOF
- chmod a+x etc/iptables/iptables.conf
-
-}
-
-vpn_config() {
- cp -r ${scriptdir}/vpn/* ./
-}
-
-#
-# IMPORTANT REMARK
-# Package intallation is no longer done via this script. We are not removing the code yet, but we want to
-# make sure that everybody willing to install/update packages should refer to the file:
-# ==> cloud-tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh
-#
-packages() {
- DEBIAN_FRONTEND=noninteractive
- DEBIAN_PRIORITY=critical
- DEBCONF_DB_OVERRIDE=’File{/root/config.dat}’
- export DEBIAN_FRONTEND DEBIAN_PRIORITY DEBCONF_DB_OVERRIDE
-
- #basic stuff
- chroot . apt-get --no-install-recommends -q -y --force-yes install rsyslog logrotate cron chkconfig insserv net-tools ifupdown vim-tiny netbase iptables openssh-server grub-legacy e2fsprogs dhcp3-client dnsmasq tcpdump socat wget python bzip2 sed gawk diffutils grep gzip less tar telnet ftp rsync traceroute psmisc lsof procps monit inetutils-ping iputils-arping httping dnsutils zip unzip ethtool uuid file iproute acpid iptables-persistent virt-what sudo
- #fix hostname in openssh-server generated keys
- sed -i "s/root@\(.*\)$/root@systemvm/g" etc/ssh/ssh_host_*.pub
-
- #sysstat
- chroot . echo 'sysstat sysstat/enable boolean true' | chroot . debconf-set-selections
- chroot . apt-get --no-install-recommends -q -y --force-yes install sysstat
- #apache
- chroot . apt-get --no-install-recommends -q -y --force-yes install apache2 ssl-cert
- #haproxy
- chroot . apt-get --no-install-recommends -q -y --force-yes install haproxy
- #dnsmasq
- chroot . apt-get --no-install-recommends -q -y --force-yes install dnsmasq
- #nfs client
- chroot . apt-get --no-install-recommends -q -y --force-yes install nfs-common
- #vpn stuff
- chroot . apt-get --no-install-recommends -q -y --force-yes install xl2tpd openswan bcrelay ppp ipsec-tools tdb-tools
- #vmware tools
- chroot . apt-get --no-install-recommends -q -y --force-yes install open-vm-tools
- #xenstore utils
- chroot . apt-get --no-install-recommends -q -y --force-yes install xenstore-utils libxenstore3.0
- #keepalived - install version 1.2.13 from wheezy backports
- chroot . apt-get --no-install-recommends -q -y --force-yes -t wheezy-backports install keepalived
- #conntrackd
- chroot . apt-get --no-install-recommends -q -y --force-yes install conntrackd ipvsadm libnetfilter-conntrack3 libnl1
- #ipcalc
- chroot . apt-get --no-install-recommends -q -y --force-yes install ipcalc
- #irqbalance from wheezy-backports
- chroot . apt-get --no-install-recommends -q -y --force-yes -t wheezy-backports install irqbalance
-
- echo "***** getting jre 7 *********"
- chroot . apt-get --no-install-recommends -q -y install openjdk-7-jre-headless
-}
-
-
-password() {
- chroot . echo "root:$PASSWORD" | chroot . chpasswd
-}
-
-apache2() {
- chroot . a2enmod ssl rewrite auth_basic auth_digest
- chroot . a2ensite default-ssl
- cp etc/apache2/sites-available/default etc/apache2/sites-available/default.orig
- cp etc/apache2/sites-available/default-ssl etc/apache2/sites-available/default-ssl.orig
-}
-
-services() {
- mkdir -p ./var/www/html
- mkdir -p ./opt/cloud/bin
- mkdir -p ./var/cache/cloud
- mkdir -p ./usr/share/cloud
- mkdir -p ./usr/local/cloud
- mkdir -p ./root/.ssh
- #Fix haproxy directory issue
- mkdir -p ./var/lib/haproxy
-
- /bin/cp -r ${scriptdir}/config/* ./
- chroot . chkconfig xl2tpd off
- chroot . chkconfig --add cloud-early-config
- chroot . chkconfig cloud-early-config on
- chroot . chkconfig --add iptables-persistent
- chroot . chkconfig iptables-persistent off
- chroot . chkconfig --force --add cloud-passwd-srvr
- chroot . chkconfig cloud-passwd-srvr off
- chroot . chkconfig --add cloud
- chroot . chkconfig cloud off
- chroot . chkconfig monit off
-}
-
-dhcp_fix() {
- #deal with virtio DHCP issue, copy and install customized kernel module and iptables
- mkdir -p tmp
- cp /tmp/systemvm/xt_CHECKSUM.ko lib/modules/2.6.32-5-686-bigmem/kernel/net/netfilter
- chroot . depmod -a 2.6.32-5-686-bigmem
- cp /tmp/systemvm/iptables_1.4.8-3local1checksum1_i386.deb tmp/
- chroot . dpkg -i tmp/iptables_1.4.8-3local1checksum1_i386.deb
- rm tmp/iptables_1.4.8-3local1checksum1_i386.deb
-}
-
-install_xs_tool() {
- #deal with virtio DHCP issue, copy and install customized kernel module and iptables
- mkdir -p tmp
- cp /tmp/systemvm/xe-guest-utilities_5.6.0-595_i386.deb tmp/
- chroot . dpkg -i tmp/xe-guest-utilities_5.6.0-595_i386.deb
- rm tmp/xe-guest-utilities_5.6.0-595_i386.deb
-}
-
-cleanup() {
- rm -f usr/sbin/policy-rc.d
- rm -f root/config.dat
- rm -f etc/apt/apt.conf.d/01proxy
-
- if [ "$MINIMIZE" == "true" ]
- then
- rm -rf var/cache/apt/*
- rm -rf var/lib/apt/*
- rm -rf usr/share/locale/[a-d]*
- rm -rf usr/share/locale/[f-z]*
- rm -rf usr/share/doc/*
- size=$(df $MOUNTPOINT | awk '{print $4}' | grep -v Available)
- dd if=/dev/zero of=$MOUNTPOINT/zeros.img bs=1M count=$((((size-150000)) / 1000))
- rm -f $MOUNTPOINT/zeros.img
- fi
-}
-
-signature() {
- (cd ${scriptdir}/config; tar cvf ${MOUNTPOINT}/usr/share/cloud/cloud-scripts.tar *)
- (cd ${scriptdir}/vpn; tar rvf ${MOUNTPOINT}/usr/share/cloud/cloud-scripts.tar *)
- gzip -c ${MOUNTPOINT}/usr/share/cloud/cloud-scripts.tar > ${MOUNTPOINT}/usr/share/cloud/cloud-scripts.tgz
- md5sum ${MOUNTPOINT}/usr/share/cloud/cloud-scripts.tgz |awk '{print $1}' > ${MOUNTPOINT}/var/cache/cloud/cloud-scripts-signature
- echo "Cloudstack Release $CLOUDSTACK_RELEASE $(date)" > ${MOUNTPOINT}/etc/cloudstack-release
-}
-
-#check grub version
-
-grub --version | grep "0.9" > /dev/null
-if [ $? -ne 0 ]
-then
- echo You need grub 0.9x\(grub-legacy\) to use this script!
- exit 1
-fi
-
-mkdir -p $IMAGENAME
-mkdir -p $LOCATION
-MOUNTPOINT=/mnt/$IMAGENAME/
-IMAGELOC=$LOCATION/$IMAGENAME.img
-scriptdir=$(dirname $PWD/$0)
-
-rm -rf /tmp/systemvm
-mkdir -p /tmp/systemvm
-#cp ./xt_CHECKSUM.ko /tmp/systemvm
-#cp ./iptables_1.4.8-3local1checksum1_i386.deb /tmp/systemvm
-#cp ./xe-guest-utilities_5.6.0-595_i386.deb /tmp/systemvm
-
-rm -f $IMAGELOC
-begin=$(date +%s)
-echo "*************INSTALLING BASEIMAGE********************"
-baseimage
-
-cp $scriptdir/config.dat $MOUNTPOINT/root/
-cd $MOUNTPOINT
-
-mount -o bind /proc $MOUNTPOINT/proc
-mount -o bind /dev $MOUNTPOINT/dev
-
-echo "*************CONFIGURING APT********************"
-fixapt
-echo "*************DONE CONFIGURING APT********************"
-
-echo "*************CONFIGURING NETWORK********************"
-network
-echo "*************DONE CONFIGURING NETWORK********************"
-
-echo "*************INSTALLING KERNEL********************"
-install_kernel $IMAGELOC
-echo "*************DONE INSTALLING KERNEL********************"
-
-echo "*************CONFIGURING GRUB********************"
-fixgrub $IMAGELOC
-echo "*************DONE CONFIGURING GRUB********************"
-
-
-echo "*************CONFIGURING INITTAB********************"
-fixinittab
-echo "*************DONE CONFIGURING INITTAB********************"
-
-echo "*************CONFIGURING FSTAB********************"
-fixfstab
-echo "*************DONE CONFIGURING FSTAB********************"
-
-echo "*************CONFIGURING ACPID********************"
-fixacpid
-echo "*************DONE CONFIGURING ACPID********************"
-
-echo "*************INSTALLING PACKAGES********************"
-packages
-echo "*************DONE INSTALLING PACKAGES********************"
-
-echo "*************CONFIGURING IPTABLES********************"
-fixiptables
-echo "*************DONE CONFIGURING IPTABLES********************"
-
-echo "*************CONFIGURING PASSWORD********************"
-password
-
-echo "*************CONFIGURING SERVICES********************"
-services
-
-echo "*************CONFIGURING APACHE********************"
-apache2
-
-echo "*************CONFIGURING VPN********************"
-vpn_config
-
-echo "*************FIX DHCP ISSUE********************"
-#dhcp_fix
-
-echo "*************INSTALL XS TOOLS********************"
-#install_xs_tool
-
-echo "*************CLEANING UP********************"
-cleanup
-
-echo "*************GENERATING SIGNATURE********************"
-signature
-
-cd $scriptdir
-
-umount $MOUNTPOINT/proc
-umount $MOUNTPOINT/dev
-umount $MOUNTPOINT
-fin=$(date +%s)
-t=$((fin-begin))
-echo "Finished building image $IMAGELOC in $t seconds"
-
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud b/systemvm/patches/debian/config/etc/init.d/cloud
index f9a9915..9b3a63b 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud
+++ b/systemvm/patches/debian/config/etc/init.d/cloud
@@ -1,13 +1,11 @@
-#!/bin/bash
+#!/bin/bash
### BEGIN INIT INFO
# Provides: cloud
-# Required-Start: mountkernfs $local_fs cloud-early-config
+# Required-Start: $local_fs cloud-early-config
# Required-Stop: $local_fs
-# Should-Start:
-# Should-Stop:
-# Default-Start:
+# Default-Start: 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: Start up the CloudStack cloud service
+# Short-Description: Start up the CloudStack cloud service
### END INIT INFO
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index 3bdebdb..1d3a890 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -1,10 +1,8 @@
#!/bin/bash
### BEGIN INIT INFO
# Provides: cloud-early-config
-# Required-Start: mountkernfs $local_fs
+# Required-Start: $local_fs
# Required-Stop: $local_fs
-# Should-Start:
-# Should-Stop:
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: configure according to cmdline
@@ -38,6 +36,9 @@ mkdir -p /var/lib/haproxy
# Clear boot up flag, it would be created by rc.local after boot up done
rm -f /var/cache/cloud/boot_up_done
+# Randomize cloud password so only ssh login is allowed
+echo "cloud:`openssl rand -base64 32`" | chpasswd
+
[ -x /sbin/ifup ] || exit 0
. /lib/lsb/init-functions
@@ -807,7 +808,7 @@ setup_sshd(){
setup_vpc_apache2() {
log_it "Setting up apache web server for VPC"
- chkconfig apache2 off
+ systemctl disable apache2
clean_ipalias_config
setup_apache2_common
}
@@ -942,7 +943,7 @@ setup_router() {
disable_rpfilter_domR
enable_fwding 1
enable_rpsrfs 1
- chkconfig nfs-common off
+ systemctl disable nfs-common
cp /etc/iptables/iptables-router /etc/iptables/rules.v4
#for old templates
cp /etc/iptables/iptables-router /etc/iptables/rules
@@ -1083,7 +1084,7 @@ setup_dhcpsrvr() {
enable_svc cloud-passwd-srvr 1
enable_svc cloud 0
enable_fwding 0
- chkconfig nfs-common off
+ systemctl disable nfs-common
cp /etc/iptables/iptables-router /etc/iptables/rules.v4
cp /etc/iptables/iptables-router /etc/iptables/rules
@@ -1239,7 +1240,7 @@ setup_console_proxy() {
enable_svc dnsmasq 0
enable_svc cloud-passwd-srvr 0
enable_svc cloud 1
- chkconfig nfs-common off
+ systemctl disable nfs-common
rm /etc/logrotate.d/cloud
}
@@ -1267,8 +1268,8 @@ setup_elbvm() {
enable_svc dnsmasq 0
enable_svc cloud-passwd-srvr 0
enable_svc cloud 0
- chkconfig nfs-common off
- chkconfig portmap off
+ systemctl disable nfs-common
+ systemctl disable portmap
}
setup_ilbvm() {
@@ -1290,8 +1291,8 @@ setup_ilbvm() {
enable_svc dnsmasq 0
enable_svc cloud-passwd-srvr 0
enable_svc cloud 0
- chkconfig nfs-common off
- chkconfig portmap off
+ systemctl disable nfs-common
+ systemctl disable portmap
}
setup_default() {
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-passwd-srvr b/systemvm/patches/debian/config/etc/init.d/cloud-passwd-srvr
index 33b0ea3..c089e72 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-passwd-srvr
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-passwd-srvr
@@ -1,12 +1,10 @@
-#!/bin/bash
+#!/bin/bash
### BEGIN INIT INFO
# Provides: cloud-passwd-srvr
-# Required-Start: mountkernfs $local_fs cloud-early-config iptables-persistent
+# Required-Start: $local_fs cloud-early-config
# Required-Stop: $local_fs
-# Should-Start:
-# Should-Stop:
-# Default-Start:
-# Default-Stop: 0 6
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 6
# Short-Description: Web server that sends passwords to User VMs
### END INIT INFO
# Licensed to the Apache Software Foundation (ASF) under one
diff --git a/systemvm/patches/debian/config/etc/init.d/postinit b/systemvm/patches/debian/config/etc/init.d/postinit
index 818959f..ddbcb08 100755
--- a/systemvm/patches/debian/config/etc/init.d/postinit
+++ b/systemvm/patches/debian/config/etc/init.d/postinit
@@ -1,13 +1,11 @@
#!/bin/bash -e
### BEGIN INIT INFO
# Provides: postinit
-# Required-Start: mountkernfs $local_fs cloud-early-config
+# Required-Start: $local_fs cloud-early-config
# Required-Stop: $local_fs
-# Should-Start:
-# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: post-init
+# Short-Description: post-init
### END INIT INFO
# Licensed to the Apache Software Foundation (ASF) under one
diff --git a/systemvm/patches/debian/config/etc/rc.local b/systemvm/patches/debian/config/etc/rc.local
index 3b19218..c0b1939 100755
--- a/systemvm/patches/debian/config/etc/rc.local
+++ b/systemvm/patches/debian/config/etc/rc.local
@@ -1,4 +1,4 @@
-#/bin/bash
+#!/bin/bash
#Licensed to the Apache Software Foundation (ASF) under one
#or more contributor license agreements. See the NOTICE file
diff --git a/systemvm/patches/debian/config/etc/ssh/sshd_config b/systemvm/patches/debian/config/etc/ssh/sshd_config
index 6c64719..75f30cc 100644
--- a/systemvm/patches/debian/config/etc/ssh/sshd_config
+++ b/systemvm/patches/debian/config/etc/ssh/sshd_config
@@ -13,7 +13,6 @@
Port 3922
#AddressFamily any
#ListenAddress 0.0.0.0
-#ListenAddress ::
# Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/patchsystemvm.sh b/systemvm/patches/debian/config/opt/cloud/bin/patchsystemvm.sh
index 34450dc..81a1b14 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/patchsystemvm.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/patchsystemvm.sh
@@ -40,34 +40,34 @@ patch_console_proxy() {
}
consoleproxy_svcs() {
- chkconfig cloud on
- chkconfig postinit on
- chkconfig cloud-passwd-srvr off
- chkconfig haproxy off ;
- chkconfig dnsmasq off
- chkconfig ssh on
- chkconfig apache2 off
- chkconfig nfs-common off
- chkconfig portmap off
- chkconfig keepalived off
- chkconfig conntrackd off
+ systemctl enable cloud
+ systemctl enable postinit
+ systemctl disable cloud-passwd-srvr
+ systemctl disable haproxy
+ systemctl disable dnsmasq
+ systemctl enable ssh
+ systemctl disable apache2
+ systemctl disable nfs-common
+ systemctl disable portmap
+ systemctl disable keepalived
+ systemctl disable conntrackd
echo "cloud postinit ssh" > /var/cache/cloud/enabled_svcs
echo "cloud-passwd-srvr haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs
mkdir -p /var/log/cloud
}
secstorage_svcs() {
- chkconfig cloud on
- chkconfig postinit on
- chkconfig cloud-passwd-srvr off
- chkconfig haproxy off ;
- chkconfig dnsmasq off
- chkconfig portmap on
- chkconfig nfs-common on
- chkconfig ssh on
- chkconfig apache2 off
- chkconfig keepalived off
- chkconfig conntrackd off
+ systemctl enable cloud on
+ systemctl enable postinit on
+ systemctl disable cloud-passwd-srvr
+ systemctl disable haproxy
+ systemctl disable dnsmasq
+ systemctl enable portmap
+ systemctl enable nfs-common
+ systemctl enable ssh
+ systemctl disable apache2
+ systemctl disable keepalived
+ systemctl disable conntrackd
echo "cloud postinit ssh nfs-common portmap" > /var/cache/cloud/enabled_svcs
echo "cloud-passwd-srvr haproxy dnsmasq" > /var/cache/cloud/disabled_svcs
mkdir -p /var/log/cloud
@@ -76,67 +76,67 @@ secstorage_svcs() {
routing_svcs() {
grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null
RROUTER=$?
- chkconfig cloud off
- chkconfig haproxy on ;
- chkconfig ssh on
- chkconfig nfs-common off
- chkconfig portmap off
+ systemctl disable cloud
+ systemctl disable haproxy
+ systemctl enable ssh
+ systemctl disable nfs-common
+ systemctl disable portmap
echo "ssh haproxy apache2" > /var/cache/cloud/enabled_svcs
echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs
if [ $RROUTER -eq 0 ]
then
- chkconfig dnsmasq off
- chkconfig cloud-passwd-srvr off
- chkconfig keepalived on
- chkconfig conntrackd on
- chkconfig postinit on
+ systemctl disable dnsmasq
+ systemctl disable cloud-passwd-srvr
+ systemctl enable keepalived
+ systemctl enable conntrackd
+ systemctl enable postinit
echo "keepalived conntrackd postinit" >> /var/cache/cloud/enabled_svcs
echo "dnsmasq cloud-passwd-srvr" >> /var/cache/cloud/disabled_svcs
else
- chkconfig dnsmasq on
- chkconfig cloud-passwd-srvr on
- chkconfig keepalived off
- chkconfig conntrackd off
+ systemctl enable dnsmasq
+ systemctl enable cloud-passwd-srvr
+ systemctl disable keepalived
+ systemctl disable conntrackd
echo "dnsmasq cloud-passwd-srvr " >> /var/cache/cloud/enabled_svcs
echo "keepalived conntrackd " >> /var/cache/cloud/disabled_svcs
fi
}
dhcpsrvr_svcs() {
- chkconfig cloud off
- chkconfig cloud-passwd-srvr on ;
- chkconfig haproxy off ;
- chkconfig dnsmasq on
- chkconfig ssh on
- chkconfig nfs-common off
- chkconfig portmap off
- chkconfig keepalived off
- chkconfig conntrackd off
+ systemctl disable cloud
+ systemctl enable cloud-passwd-srvr
+ systemctl disable haproxy
+ systemctl enable dnsmasq
+ systemctl enable ssh
+ systemctl disable nfs-common
+ systemctl disable portmap
+ systemctl disable keepalived
+ systemctl disable conntrackd
echo "ssh dnsmasq cloud-passwd-srvr apache2" > /var/cache/cloud/enabled_svcs
echo "cloud nfs-common haproxy portmap" > /var/cache/cloud/disabled_svcs
}
elbvm_svcs() {
- chkconfig cloud off
- chkconfig haproxy on ;
- chkconfig ssh on
- chkconfig nfs-common off
- chkconfig portmap off
- chkconfig keepalived off
- chkconfig conntrackd off
+ systemctl disable cloud
+ systemctl disable haproxy
+ systemctl enable ssh
+ systemctl disable nfs-common
+ systemctl disable portmap
+ systemctl disable keepalived
+ systemctl disable conntrackd
echo "ssh haproxy" > /var/cache/cloud/enabled_svcs
echo "cloud dnsmasq cloud-passwd-srvr apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs
}
ilbvm_svcs() {
- chkconfig cloud off
- chkconfig haproxy on ;
- chkconfig ssh on
- chkconfig nfs-common off
- chkconfig portmap off
- chkconfig keepalived off
- chkconfig conntrackd off
+ systemctl disable cloud
+ systemctl enable haproxy
+ systemctl enable ssh
+ systemctl disable nfs-common
+ systemctl disable portmap
+ systemctl disable keepalived
+ systemctl disable conntrackd
echo "ssh haproxy" > /var/cache/cloud/enabled_svcs
echo "cloud dnsmasq cloud-passwd-srvr apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs
}
@@ -149,11 +149,11 @@ enable_pcihotplug() {
}
enable_serial_console() {
- sed -i -e "/^serial.*/d" /boot/grub/grub.conf
- sed -i -e "/^terminal.*/d" /boot/grub/grub.conf
- sed -i -e "/^default.*/a\serial --unit=0 --speed=115200 --parity=no --stop=1" /boot/grub/grub.conf
- sed -i -e "/^serial.*/a\terminal --timeout=0 serial console" /boot/grub/grub.conf
- sed -i -e "s/\(^kernel.* ro\) \(console.*\)/\1 console=tty0 console=ttyS0,115200n8/" /boot/grub/grub.conf
+ #sed -i -e "/^serial.*/d" /boot/grub/grub.conf
+ #sed -i -e "/^terminal.*/d" /boot/grub/grub.conf
+ #sed -i -e "/^default.*/a\serial --unit=0 --speed=115200 --parity=no --stop=1" /boot/grub/grub.conf
+ #sed -i -e "/^serial.*/a\terminal --timeout=0 serial console" /boot/grub/grub.conf
+ #sed -i -e "s/\(^kernel.* ro\) \(console.*\)/\1 console=tty0 console=ttyS0,115200n8/" /boot/grub/grub.conf
sed -i -e "/^s0:2345:respawn.*/d" /etc/inittab
sed -i -e "/6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab
}
diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh
index 0b31cc1..45f4728 100755
--- a/tools/appliance/build.sh
+++ b/tools/appliance/build.sh
@@ -594,7 +594,7 @@ function main() {
add_on_exit veewee_destroy
veewee_build
save_mac_address
- veewee_halt
+ veewee_halt || true
retry 10 check_appliance_shutdown
retry 10 check_appliance_disk_ready
retry 10 remove_shares
diff --git a/tools/appliance/definitions/systemvmtemplate/apt_upgrade.sh b/tools/appliance/definitions/systemvmtemplate/apt_upgrade.sh
index f98c6b5..eb9b790 100644
--- a/tools/appliance/definitions/systemvmtemplate/apt_upgrade.sh
+++ b/tools/appliance/definitions/systemvmtemplate/apt_upgrade.sh
@@ -23,20 +23,23 @@ function add_backports() {
sed -i '/cdrom/d' /etc/apt/sources.list
sed -i '/deb-src/d' /etc/apt/sources.list
sed -i '/backports/d' /etc/apt/sources.list
- echo 'deb http://http.debian.net/debian wheezy-backports main' >> /etc/apt/sources.list
+ echo 'deb http://http.debian.net/debian stretch-backports main' >> /etc/apt/sources.list
}
function apt_upgrade() {
DEBIAN_FRONTEND=noninteractive
DEBIAN_PRIORITY=critical
+ # Setup sudo
+ echo 'cloud ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/cloud
+
add_backports
rm -fv /root/*.iso
apt-get -y autoremove
apt-get autoclean
- apt-get -q -y --force-yes update
- apt-get -q -y --force-yes upgrade
+ apt-get -q -y update
+ apt-get -q -y upgrade
df -h
}
diff --git a/tools/appliance/definitions/systemvmtemplate/authorized_keys.sh b/tools/appliance/definitions/systemvmtemplate/authorized_keys.sh
index 63da2f4..d185723 100644
--- a/tools/appliance/definitions/systemvmtemplate/authorized_keys.sh
+++ b/tools/appliance/definitions/systemvmtemplate/authorized_keys.sh
@@ -25,5 +25,6 @@ set -x
key='ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvFu3MLSPphFRBR1yM7nBukXWS9gPdAXfqq9cfC8ZqQN9ybi531aj44CybZ4BVT4kLfzbAs7+7nJeSIpPHxjv9XFqbxjIxoFeGYkj7s0RrJgtsEmvAAubZ3mYboUAYUivMgnJFLnv4VqyAbpjix6CfECUiU4ygwo24F3F6bAmhl4Vo1R5TSUdDIX876YePJTFtuVkLl4lu/+xw1QRWrgaSFosGICT37IKY7RjE79Ozb0GjNHyJPPgVAGkUVO4LawroL9dYOBlzdHpmqqA9Kc44oQBpvcU7s1+ezRTt7fZNnP7TG9ninZtrvnP4qmwAc4iUJ7N1bwh0mCblnoTfZ28hw== anthony@mobl-ant'
mkdir -p /root/.ssh
chmod 644 /root/.ssh
+#touch /root/.ssh/authorized_keys
echo ${key} > /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
diff --git a/tools/appliance/definitions/systemvmtemplate/build_time.sh b/tools/appliance/definitions/systemvmtemplate/build_time.sh
deleted file mode 100644
index c25644b..0000000
--- a/tools/appliance/definitions/systemvmtemplate/build_time.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# 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
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-set -e
-set -x
-
-function build_time() {
- date > /etc/vagrant_box_build_time
-}
-
-return 2>/dev/null || build_time
diff --git a/tools/appliance/definitions/systemvmtemplate/cleanup.sh b/tools/appliance/definitions/systemvmtemplate/cleanup.sh
index cd32d5b..67d6c23 100644
--- a/tools/appliance/definitions/systemvmtemplate/cleanup.sh
+++ b/tools/appliance/definitions/systemvmtemplate/cleanup.sh
@@ -20,7 +20,6 @@ set -e
set -x
function cleanup_apt() {
- #apt-get -y remove linux-headers-$(uname -r) build-essential
apt-get -y remove dictionaries-common busybox
apt-get -y autoremove
apt-get autoclean
diff --git a/tools/appliance/definitions/systemvmtemplate/configure_grub.sh b/tools/appliance/definitions/systemvmtemplate/configure_grub.sh
index 5b6a80a..ec40b7c 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_grub.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_grub.sh
@@ -31,9 +31,13 @@ GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
-GRUB_CMDLINE_LINUX="debian-installer=en_US"
+GRUB_CMDLINE_LINUX="console=tty1 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 debian-installer=en_US"
+GRUB_TERMINAL="console serial"
+GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
+
EOF
+ grub-mkconfig -o /boot/grub/grub.cfg
update-grub
}
diff --git a/tools/appliance/definitions/systemvmtemplate/configure_login.sh b/tools/appliance/definitions/systemvmtemplate/configure_login.sh
index 36fccab..1735b81 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_login.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_login.sh
@@ -23,11 +23,12 @@ function add_admin_group() {
groupadd -f -r admin
}
-function configure_cloud_user() {
+function configure_user() {
usermod -a -G admin cloud
mkdir -p /home/cloud/.ssh
chmod 700 /home/cloud/.ssh
echo "cloud:`openssl rand -base64 32`" | chpasswd
+ echo "root:password" | chpasswd
}
function configure_sudoers() {
@@ -42,7 +43,7 @@ root ALL=(ALL:ALL) ALL
#includedir /etc/sudoers.d
END
- echo 'cloud ALL=NOPASSWD:/bin/chmod, /bin/cp, /bin/mkdir, /bin/mount, /bin/umount' > /etc/sudoers.d/cloud
+ echo 'cloud ALL=NOPASSWD:/bin/chmod, /bin/cp, /bin/mkdir, /bin/mount, /bin/umount, /sbin/halt' > /etc/sudoers.d/cloud
}
# sshd_config is overwritten from cloud_scripts
@@ -58,8 +59,6 @@ END
#}
function configure_inittab() {
- grep "vc:2345:respawn:/sbin/getty" /etc/inittab && return
-
# Fix inittab
cat >> /etc/inittab << EOF
@@ -68,11 +67,13 @@ EOF
}
function configure_login() {
- add_admin_group
- configure_cloud_user
- configure_sudoers
# configure_sshd
configure_inittab
+ add_admin_group
+ configure_sudoers
+ configure_user
+ rm -fv /home/cloud/configure_login.sh
+ halt -p
}
return 2>/dev/null || configure_login
diff --git a/tools/appliance/definitions/systemvmtemplate/configure_networking.sh b/tools/appliance/definitions/systemvmtemplate/configure_networking.sh
index bddcd6c..2ebd3a2 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_networking.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_networking.sh
@@ -21,13 +21,6 @@ set -x
HOSTNAME=systemvm
-# Adding a 2 sec delay to the interface up, to make the dhclient happy
-function set_interface_sleep() {
- grep "pre-up sleep 2" /etc/network/interfaces && return
-
- echo "pre-up sleep 2" >> /etc/network/interfaces
-}
-
function configure_resolv_conf() {
grep 8.8.8.8 /etc/resolv.conf && grep 8.8.4.4 /etc/resolv.conf && return
@@ -52,8 +45,24 @@ function configure_hostname() {
hostname $HOSTNAME
}
+function configure_interfaces() {
+ cat > /etc/network/interfaces << EOF
+source /etc/network/interfaces.d/*
+
+# The loopback network interface
+auto lo
+iface lo inet loopback
+
+# The primary network interface
+auto eth0
+iface eth0 inet dhcp
+pre-up sleep 2
+
+EOF
+}
+
function configure_networking() {
- set_interface_sleep
+ configure_interfaces
configure_resolv_conf
delete_dhcp_ip
configure_hostname
diff --git a/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh b/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
index 60082e3..f3bd52a 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
@@ -19,15 +19,15 @@
set -e
set -x
-CLOUDSTACK_RELEASE=4.6.0
+CLOUDSTACK_RELEASE=4.11.0
function configure_apache2() {
# Enable ssl, rewrite and auth
a2enmod ssl rewrite auth_basic auth_digest
a2ensite default-ssl
# Backup stock apache configuration since we may modify it in Secondary Storage VM
- cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default.orig
- cp /etc/apache2/sites-available/default-ssl /etc/apache2/sites-available/default-ssl.orig
+ cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/default.orig
+ cp /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-available/default-ssl.orig
sed -i 's/SSLProtocol all -SSLv2$/SSLProtocol all -SSLv2 -SSLv3/g' /etc/apache2/mods-available/ssl.conf
}
@@ -39,12 +39,76 @@ function install_cloud_scripts() {
/etc/init.d/{cloud,cloud-early-config,cloud-passwd-srvr,postinit} \
/etc/profile.d/cloud.sh
- chkconfig --add cloud-early-config
- chkconfig cloud-early-config on
- chkconfig --add cloud-passwd-srvr
- chkconfig cloud-passwd-srvr off
- chkconfig --add cloud
- chkconfig cloud off
+ cat > /lib/systemd/system/cloud-early-config.service << EOF
+[Unit]
+Description=cloud-early-config: configure according to cmdline
+DefaultDependencies=no
+After=local-fs.target apparmor.service systemd-sysctl.service systemd-modules-load.service
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=oneshot
+ExecStart=/etc/init.d/cloud-early-config start
+ExecStop=/etc/init.d/cloud-early-config stop
+RemainAfterExit=true
+TimeoutStartSec=5min
+
+EOF
+
+ cat > /lib/systemd/system/cloud.service << EOF
+[Unit]
+Description=cloud: startup cloud service
+After=cloud-early-config.service network.target local-fs.target
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=forking
+ExecStart=/etc/init.d/cloud start
+ExecStop=/etc/init.d/cloud stop
+RemainAfterExit=true
+TimeoutStartSec=5min
+EOF
+
+ cat > /lib/systemd/system/cloud-passwd-srvr.service << EOF
+[Unit]
+Description=cloud-passwd-srvr: cloud password server
+After=network.target local-fs.target
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=forking
+ExecStart=/etc/init.d/cloud-passwd-srvr start
+ExecStop=/etc/init.d/cloud-passwd-srvr stop
+RemainAfterExit=true
+TimeoutStartSec=5min
+EOF
+
+ cat > /lib/systemd/system/postinit.service << EOF
+[Unit]
+Description=cloud post-init service
+After=cloud-early-config.service network.target local-fs.target
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=forking
+ExecStart=/etc/init.d/postinit start
+ExecStop=/etc/init.d/postinit stop
+RemainAfterExit=true
+TimeoutStartSec=5min
+EOF
+
+ systemctl daemon-reload
+ systemctl enable cloud-early-config
+ systemctl disable cloud-passwd-srvr
+ systemctl disable cloud
}
function do_signature() {
@@ -72,18 +136,20 @@ function configure_services() {
install_cloud_scripts
do_signature
- chkconfig xl2tpd off
+ systemctl daemon-reload
+ systemctl disable xl2tpd
# Disable services that slow down boot and are not used anyway
- chkconfig x11-common off
- chkconfig console-setup off
+ systemctl disable x11-common
+ systemctl disable console-setup
+ systemctl disable haproxy
# Hyperv kvp daemon - 64bit only
local arch=`dpkg --print-architecture`
if [ "${arch}" == "amd64" ]; then
- chkconfig hv_kvp_daemon off
+ systemctl disable hv_kvp_daemon
fi
- chkconfig radvd off
+ systemctl disable radvd
configure_apache2
configure_strongswan
diff --git a/tools/appliance/definitions/systemvmtemplate/definition.rb b/tools/appliance/definitions/systemvmtemplate/definition.rb
index e0c44e2..cea7bd2 100644
--- a/tools/appliance/definitions/systemvmtemplate/definition.rb
+++ b/tools/appliance/definitions/systemvmtemplate/definition.rb
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-arch = ENV['VM_ARCH'] || 'i386'
+arch = 'amd64'
#
# NOTE: Before changing the version of the debian image make
@@ -25,25 +25,19 @@ arch = ENV['VM_ARCH'] || 'i386'
# removed from the debian mirrors
#
architectures = {
- :i386 => {
- :os_type_id => 'Debian',
- :iso_file => 'debian-7.11.0-i386-netinst.iso',
- :iso_src => 'http://cdimage.debian.org/cdimage/archive/7.11.0/i386/iso-cd/debian-7.11.0-i386-netinst.iso',
- :iso_md5 => '75055a694508f5b891038ec12d703c9e',
- },
:amd64 => {
:os_type_id => 'Debian_64',
- :iso_file => 'debian-7.11.0-amd64-netinst.iso',
- :iso_src => 'http://cdimage.debian.org/cdimage/archive/7.11.0/amd64/iso-cd/debian-7.11.0-amd64-netinst.iso',
- :iso_md5 => '096c1c18b44c269808bd815d58c53c8f'
+ :iso_file => 'debian-9.1.0-amd64-netinst.iso',
+ :iso_src => 'https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.1.0-amd64-netinst.iso',
+ :iso_md5 => 'ddd8f6542dae8baf410e90b9ae0fe986'
}
}
config = {
:cpu_count => '1',
- :memory_size => '256',
- :disk_size => '3200', :disk_format => 'VDI', :hostiocache => 'off',
- :iso_download_timeout => '1200',
+ :memory_size => '512',
+ :disk_size => '2000', :disk_format => 'VDI', :hostiocache => 'off',
+ :iso_download_timeout => '1000',
:boot_wait => '10',
:boot_cmd_sequence => [
'<Esc>',
@@ -63,11 +57,11 @@ config = {
'<Enter>'
],
:kickstart_port => '7122',
- :kickstart_timeout => '1200',
+ :kickstart_timeout => '1000',
:kickstart_file => 'preseed.cfg',
- :ssh_login_timeout => '1200',
- :ssh_user => 'root',
- :ssh_password => 'password',
+ :ssh_login_timeout => '10000',
+ :ssh_user => 'cloud',
+ :ssh_password => 'cloud',
:ssh_key => '',
:ssh_host_port => '7222',
:ssh_guest_port => '22',
@@ -75,11 +69,9 @@ config = {
:shutdown_cmd => 'halt -p',
:postinstall_files => [
# basic minimal vm creation
- 'build_time.sh',
'apt_upgrade.sh',
'configure_grub.sh',
'configure_locale.sh',
- 'configure_login.sh',
'configure_networking.sh',
'configure_acpid.sh',
# turning it into a systemvm
@@ -91,9 +83,11 @@ config = {
'configure_persistent_config.sh',
# cleanup & space-saving
'cleanup.sh',
- 'zerodisk.sh'
+ 'zerodisk.sh',
+ # setup login stuff
+ 'configure_login.sh'
],
- :postinstall_timeout => '1200'
+ :postinstall_timeout => '10000'
}
config.merge! architectures[arch.to_sym]
diff --git a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh
index 9daa2d8..227f533 100644
--- a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh
+++ b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh
@@ -43,7 +43,7 @@ function install_packages() {
debconf_packages
install_vhd_util
- local apt_get="apt-get --no-install-recommends -q -y --force-yes"
+ local apt_get="apt-get --no-install-recommends -q -y"
#32 bit architecture support:: not required for 32 bit template
if [ "${arch}" != "i386" ]; then
@@ -53,8 +53,8 @@ function install_packages() {
fi
${apt_get} install \
- rsyslog logrotate cron chkconfig insserv net-tools ifupdown vim-tiny netbase iptables \
- openssh-server e2fsprogs dhcp3-client tcpdump socat wget \
+ rsyslog logrotate cron insserv net-tools ifupdown vim netbase iptables \
+ openssh-server e2fsprogs isc-dhcp-client tcpdump socat wget \
python bzip2 sed gawk diffutils grep gzip less tar telnet ftp rsync traceroute psmisc lsof procps \
inetutils-ping iputils-arping httping curl \
dnsutils zip unzip ethtool uuid file iproute acpid virt-what sudo \
@@ -67,19 +67,22 @@ function install_packages() {
xenstore-utils libxenstore3.0 \
conntrackd ipvsadm libnetfilter-conntrack3 libnl-3-200 libnl-genl-3-200 \
ipcalc \
+ openjdk-8-jre-headless \
ipset \
iptables-persistent \
libtcnative-1 libssl-dev libapr1-dev \
python-flask \
haproxy \
radvd \
- sharutils
+ sharutils \
+ keepalived irqbalance open-vm-tools qemu-guest-agent \
+ strongswan libcharon-extra-plugins libstrongswan-extra-plugins
- ${apt_get} -t wheezy-backports install keepalived irqbalance open-vm-tools qemu-guest-agent
- ${apt_get} -t wheezy-backports install strongswan libcharon-extra-plugins libstrongswan-extra-plugins
+ apt-get autoclean
+ apt-get clean
apt-get update
- apt-get -y --force-yes upgrade
+ apt-get -y upgrade
if [ "${arch}" == "amd64" ]; then
# Hyperv kvp daemon - 64bit only
@@ -87,22 +90,7 @@ function install_packages() {
wget http://people.apache.org/~rajeshbattala/hv-kvp-daemon_3.1_amd64.deb
dpkg -i hv-kvp-daemon_3.1_amd64.deb
rm -f hv-kvp-daemon_3.1_amd64.deb
- # XS tools
- wget --no-check-certificate https://raw.githubusercontent.com/rhtyd/cloudstack-nonoss/master/xe-guest-utilities_6.5.0_amd64.deb
- md5sum xe-guest-utilities_6.5.0_amd64.deb
- dpkg -i xe-guest-utilities_6.5.0_amd64.deb
- rm -f xe-guest-utilities_6.5.0_amd64.deb
fi
-
- # Install OpenJDK8 pkgs maintained by Azul
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9
- echo 'deb http://repos.azulsystems.com/debian stable main' > /etc/apt/sources.list.d/zulu.list
- apt-get -y autoremove
- apt-get autoclean
- apt-get clean
- apt-get update
- ${apt_get} install zulu-8
- java -version
}
return 2>/dev/null || install_packages
diff --git a/tools/appliance/definitions/systemvmtemplate/preseed.cfg b/tools/appliance/definitions/systemvmtemplate/preseed.cfg
index 77402d7..6d56b76 100644
--- a/tools/appliance/definitions/systemvmtemplate/preseed.cfg
+++ b/tools/appliance/definitions/systemvmtemplate/preseed.cfg
@@ -17,22 +17,35 @@
### Localization
# Locale sets language and country.
-d-i debian-installer/locale string en_US
+d-i debian-installer/locale string en_US.UTF-8
# Keyboard selection.
-d-i console-keymaps-at/keymap select us
+d-i keyboard-configuration/xkb-keymap select us
### Network configuration
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string systemvm
-d-i netcfg/get_domain string cloudstack.org
+d-i netcfg/get_domain string apache.org
+d-i netcfg/wireless_wep string
+
+d-i hw-detect/load_firmware boolean true
### Mirror settings
d-i mirror/country string manual
-d-i mirror/http/hostname string http.us.debian.org
+d-i mirror/http/hostname string http.debian.net
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
+### Apt setup
+d-i apt-setup/cdrom/set-first false
+#d-i apt-setup/non-free boolean true
+#d-i apt-setup/contrib boolean true
+#d-i apt-setup/use_mirror boolean true
+d-i apt-setup/services-select multiselect security, updates
+d-i apt-setup/security_host string security.debian.org
+d-i apt-setup/local0/source boolean false
+d-i apt-setup/multiarch string i386
+
### Clock and time zone setup
d-i clock-setup/utc boolean true
d-i time/zone string UTC
@@ -44,51 +57,33 @@ d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/expert_recipe string \
boot-root :: \
- 80 50 160 ext4 \
+ 80 50 100 ext4 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /boot } \
. \
- 500 40 800 ext4 \
+ 1500 40 1600 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
- 50 100 100 ext4 \
- method{ format } format{ } \
- use_filesystem{ } filesystem{ ext4 } \
- mountpoint{ /home } \
- . \
- 1000 60 1400 ext4 \
- method{ format } format{ } \
- use_filesystem{ } filesystem{ ext4 } \
- mountpoint{ /usr } \
- . \
- 200 40 300 ext4 \
- method{ format } format{ } \
- use_filesystem{ } filesystem{ ext4 } \
- mountpoint{ /opt } \
- . \
- 600 70 1200 ext4 \
- method{ format } format{ } \
- use_filesystem{ } filesystem{ ext4 } \
- mountpoint{ /var } \
- . \
- 400 50 500 ext4 \
+ 300 50 300 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /var/log } \
. \
- 100 90 200 ext4 \
+ 100 90 100 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /tmp } \
. \
- 256 100 1024 linux-swap \
+ 100 100 200 linux-swap \
method{ swap } format{ } \
.
-d-i partman/confirm_write_new_label boolean true
+
+d-i partman-md/confirm boolean true
+d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
@@ -97,10 +92,10 @@ d-i partman/confirm_nooverwrite boolean true
# ...
### Account setup
-d-i passwd/root-login boolean true
+d-i passwd/root-login boolean false
d-i passwd/root-password password password
d-i passwd/root-password-again password password
-d-i passwd/user-fullname string Cloud Stack
+d-i passwd/user-fullname string Cloud User
d-i passwd/username string cloud
d-i passwd/user-password password cloud
d-i passwd/user-password-again password cloud
@@ -108,12 +103,14 @@ d-i user-setup/encrypt-home boolean false
d-i user-setup/allow-password-weak boolean true
d-i passwd/user-default-groups string audio cdrom video admin
+#openssh-server openssh-server/permit-root-login boolean true
+
### Apt setup
# ...
### Package selection
tasksel tasksel/first multiselect ssh-server
-d-i pkgsel/include string openssh-server ntp acpid sudo bzip2 openssl
+d-i pkgsel/include string openssh-server ntp acpid sudo bzip2 openssl
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select none
@@ -121,12 +118,10 @@ popularity-contest popularity-contest/participate boolean false
### Boot loader installation
d-i grub-installer/only_debian boolean true
+d-i grub-installer/with_other_os boolean true
+d-i grub-installer/bootdev string default
d-i finish-install/reboot_in_progress note
-### Preseeding other packages
-libssl1.0.0 libssl1.0.0/restart-services string
-libssl1.0.0 libssl1.0.0/restart-failed error
-
#### Advanced options
# Prevent packaged version of VirtualBox Guest Additions being installed:
d-i preseed/early_command string sed -i \
diff --git a/tools/appliance/definitions/systemvmtemplate/zerodisk.sh b/tools/appliance/definitions/systemvmtemplate/zerodisk.sh
index d0cc131..7adea8a 100644
--- a/tools/appliance/definitions/systemvmtemplate/zerodisk.sh
+++ b/tools/appliance/definitions/systemvmtemplate/zerodisk.sh
@@ -22,9 +22,10 @@ set -x
# clean up stuff copied in by veewee
function cleanup_veewee() {
# this has to be here since it is the last file to run (and we remove ourselves)
- rm -fv /root/*.iso
- rm -fv /root/{apt_upgrade,authorized_keys,build_time,cleanup,install_systemvm_packages,zerodisk}.sh
- rm -fv /root/configure_{acpid,conntrack,grub,locale,login,networking,systemvm_services}.sh
+ cd /home/cloud
+ rm -fv *.iso
+ rm -fv {apt_upgrade,authorized_keys,cleanup,install_systemvm_packages,zerodisk}.sh
+ rm -fv configure_{acpid,conntrack,grub,locale,networking,persistent_config,systemvm_services}.sh /home/cloud/install_systemvm_packages.sh
rm -fv .veewee_version .veewee_params .vbox_version
}
@@ -32,7 +33,7 @@ function cleanup_veewee() {
function zero_disk() {
cleanup_veewee
- for path in / /boot /usr /var /var/log /opt /tmp /home
+ for path in / /boot /var/log /tmp
do
dd if=/dev/zero of=${path}/zero bs=1M || true
sync
--
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>.
[cloudstack] 04/07: Accept DOS/MBR as file format for ISO images as
well
Posted by bh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 1305744960c7577b43057f945e9ceb2f503408fd
Author: Wido den Hollander <wi...@widodh.nl>
AuthorDate: Thu Aug 10 14:57:40 2017 +0200
Accept DOS/MBR as file format for ISO images as well
Under Debian 7 the 'file' command would return:
debian-9.1.0-amd64-netinst.iso: ISO 9660 CD-ROM filesystem data UDF filesystem data
Under Debian 9 however it will return
debian-9.1.0-amd64-netinst.iso: DOS/MBR boot sector
This would make the HTTPTemplateDownloader in the Secondary Storage VM refuse the ISO as
a valid template because it's not a correct format.
Changes this behavior so that it accepts both.
This allows us to use Debian 9 as a System VM template.
Signed-off-by: Wido den Hollander <wi...@widodh.nl>
---
.../java/org/apache/cloudstack/utils/imagestore/ImageStoreUtil.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/src/main/java/org/apache/cloudstack/utils/imagestore/ImageStoreUtil.java b/utils/src/main/java/org/apache/cloudstack/utils/imagestore/ImageStoreUtil.java
index ed13360..e754a8e 100644
--- a/utils/src/main/java/org/apache/cloudstack/utils/imagestore/ImageStoreUtil.java
+++ b/utils/src/main/java/org/apache/cloudstack/utils/imagestore/ImageStoreUtil.java
@@ -81,7 +81,7 @@ public class ImageStoreUtil {
return "";
}
- if (output.contains("ISO 9660") && isCorrectExtension(uripath, "iso")) {
+ if ((output.startsWith("ISO 9660") || output.startsWith("DOS/MBR")) && isCorrectExtension(uripath, "iso")) {
s_logger.debug("File at path " + path + " looks like an iso : " + output);
return "";
}
--
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>.
[cloudstack] 07/07: Start services after enabling them using systemd
Posted by bh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit a9f0db7f92b27b5bc81839477ef38ca99cead639
Author: Wido den Hollander <wi...@widodh.nl>
AuthorDate: Mon Aug 14 15:01:21 2017 +0200
Start services after enabling them using systemd
In addition remove /etc/init.d/cloud as this is no longer needed and done by systemd
Signed-off-by: Wido den Hollander <wi...@widodh.nl>
---
systemvm/patches/debian/config/etc/init.d/cloud | 155 ---------------------
.../debian/config/etc/init.d/cloud-early-config | 22 ++-
2 files changed, 8 insertions(+), 169 deletions(-)
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud b/systemvm/patches/debian/config/etc/init.d/cloud
deleted file mode 100755
index 9b3a63b..0000000
--- a/systemvm/patches/debian/config/etc/init.d/cloud
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/bin/bash
-### BEGIN INIT INFO
-# Provides: cloud
-# Required-Start: $local_fs cloud-early-config
-# Required-Stop: $local_fs
-# Default-Start: 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Start up the CloudStack cloud service
-### END INIT INFO
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# 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
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-#set -x
-
-ENABLED=0
-[ -e /etc/default/cloud ] && . /etc/default/cloud
-
-CMDLINE=$(cat /var/cache/cloud/cmdline)
-
-if [ ! -z $CLOUD_DEBUG ];then
- LOG_FILE=/var/log/cloud/cloud.out
-else
- LOG_FILE=/dev/null
-fi
-
-TYPE="router"
-for i in $CMDLINE
- do
- # search for foo=bar pattern and cut out foo
- FIRSTPATTERN=$(echo $i | cut -d= -f1)
- case $FIRSTPATTERN in
- type)
- TYPE=$(echo $i | cut -d= -f2)
- ;;
- esac
-done
-
-# Source function library.
-if [ -f /etc/init.d/functions ]
-then
- . /etc/init.d/functions
-fi
-
-if [ -f ./lib/lsb/init-functions ]
-then
- . /lib/lsb/init-functions
-fi
-
-_success() {
- if [ -f /etc/init.d/functions ]
- then
- success
- else
- echo "Success"
- fi
-}
-
-_failure() {
- if [ -f /etc/init.d/functions ]
- then
- failure
- else
- echo "Failed"
- fi
-}
-RETVAL=$?
-CLOUDSTACK_HOME="/usr/local/cloud"
-if [ -f $CLOUDSTACK_HOME/systemvm/utils.sh ];
-then
- . $CLOUDSTACK_HOME/systemvm/utils.sh
-else
- _failure
-fi
-
-# mkdir -p /var/log/vmops
-
-start() {
- local pid=$(get_pids)
- if [ "$pid" != "" ]; then
- echo "CloudStack cloud sevice is already running, PID = $pid"
- return 0
- fi
-
- echo -n "Starting CloudStack cloud service (type=$TYPE) "
- if [ -f $CLOUDSTACK_HOME/systemvm/run.sh ];
- then
- if [ "$pid" == "" ]
- then
- (cd $CLOUDSTACK_HOME/systemvm; nohup ./run.sh > $LOG_FILE 2>&1 & )
- pid=$(get_pids)
- echo $pid > /var/run/cloud.pid
- fi
- _success
- else
- _failure
- fi
- echo
- echo 'start' > $CLOUDSTACK_HOME/systemvm/user_request
-}
-
-stop() {
- local pid
- echo -n "Stopping CloudStack cloud service (type=$TYPE): "
- for pid in $(get_pids)
- do
- kill $pid
- done
- _success
- echo
- echo 'stop' > $CLOUDSTACK_HOME/systemvm/user_request
-}
-
-status() {
- local pids=$(get_pids)
- if [ "$pids" == "" ]
- then
- echo "CloudStack cloud service is not running"
- return 1
- fi
- echo "CloudStack cloud service (type=$TYPE) is running: process id: $pids"
- return 0
-}
-
-[ "$ENABLED" != 0 ] || exit 0
-
-case "$1" in
- start) start
- ;;
- stop) stop
- ;;
- status) status
- ;;
- restart) stop
- start
- ;;
- *) echo "Usage: $0 {start|stop|status|restart}"
- exit 1
- ;;
-esac
-
-exit $RETVAL
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index 655266c..6eaed91 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -497,16 +497,6 @@ disable_rpfilter_domR() {
echo "1" > /proc/sys/net/ipv4/conf/lo/rp_filter
}
-enable_svc() {
- local svc=$1
- local enabled=$2
-
- log_it "Enable service ${svc} = $enabled"
- local cfg=/etc/default/${svc}
- [ -f $cfg ] && sed -i "s/ENABLED=.*$/ENABLED=$enabled/" $cfg && return
-}
-
-
enable_irqbalance() {
local enabled=$1
local proc=0
@@ -803,6 +793,7 @@ setup_sshd(){
[ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config
sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4
sed -i "/3922/s/eth./$eth/" /etc/iptables/rules
+ systemctl restart sshd
}
@@ -936,6 +927,7 @@ setup_router() {
systemctl enable dnsmasq haproxy cloud-passwd-srvr
+ systemctl restart dnsmasq haproxy cloud-passwd-srvr
enable_irqbalance 1
disable_rpfilter_domR
enable_fwding 1
@@ -1055,6 +1047,8 @@ EOF
fi
load_modules
+ systemctl restart dnsmasq haproxy cloud-passwd-srvr
+
#setup hourly logrotate
mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1
@@ -1073,6 +1067,7 @@ setup_dhcpsrvr() {
[ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts
systemctl enable dnsmasq cloud-passwd-srvr
+ systemctl restart dnsmasq cloud-passwd-srvr
enable_irqbalance 0
enable_fwding 0
systemctl disable nfs-common
@@ -1147,7 +1142,7 @@ setup_ntp() {
fi
sed -i "0,/^server/s//$PATTERN\nserver/" $NTP_CONF_FILE
done
- service ntp restart
+ systemctl restart ntp
else
log_it "NTP configuration file not found"
fi
@@ -1195,12 +1190,11 @@ Header always set Access-Control-Allow-Methods "POST, OPTIONS"
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token, x-signature, x-metadata, x-expires"
CORS
- service apache2 restart
-
disable_rpfilter
enable_fwding 0
systemctl disable haproxy dnsmasq cloud-passwd-srvr
- systemctl enable cloud
+ systemctl enable cloud apache2
+ systemctl restart cloud apache2
enable_irqbalance 0
rm /etc/logrotate.d/cloud
setup_ntp
--
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>.
[cloudstack] 02/07: Load the nf_conntrack_ipv6 module for IPv6
connection tracking on SSVM
Posted by bh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit bcb2f5e81f76dd81a5c79e34350c08af613e26e8
Author: Wido den Hollander <wi...@widodh.nl>
AuthorDate: Thu Aug 10 13:51:11 2017 +0200
Load the nf_conntrack_ipv6 module for IPv6 connection tracking on SSVM
Signed-off-by: Wido den Hollander <wi...@widodh.nl>
---
tools/appliance/definitions/systemvmtemplate/configure_conntrack.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/appliance/definitions/systemvmtemplate/configure_conntrack.sh b/tools/appliance/definitions/systemvmtemplate/configure_conntrack.sh
index 54ec41b..c898afc 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_conntrack.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_conntrack.sh
@@ -35,6 +35,7 @@ function load_conntrack_modules() {
cat >> /etc/modules << EOF
nf_conntrack_ipv4
+nf_conntrack_ipv6
nf_conntrack
nf_conntrack_ftp
nf_nat_ftp
--
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>.
[cloudstack] 03/07: Move systemd services to /etc and enable
services after they have been installed
Posted by bh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit d6896b7cce2504d082607cc5c027070dc5da753e
Author: Wido den Hollander <wi...@widodh.nl>
AuthorDate: Thu Aug 10 14:36:52 2017 +0200
Move systemd services to /etc and enable services after they have been installed
Signed-off-by: Wido den Hollander <wi...@widodh.nl>
---
.../configure_systemvm_services.sh | 24 +++++++++++-----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh b/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
index f3bd52a..171c4b0 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
@@ -36,10 +36,10 @@ function install_cloud_scripts() {
rsync -av ./cloud_scripts/ /
chmod +x /opt/cloud/bin/* \
/root/{clearUsageRules.sh,reconfigLB.sh,monitorServices.py} \
- /etc/init.d/{cloud,cloud-early-config,cloud-passwd-srvr,postinit} \
+ /etc/init.d/{cloud-early-config,cloud-passwd-srvr,postinit} \
/etc/profile.d/cloud.sh
- cat > /lib/systemd/system/cloud-early-config.service << EOF
+ cat > /etc/systemd/system/cloud-early-config.service << EOF
[Unit]
Description=cloud-early-config: configure according to cmdline
DefaultDependencies=no
@@ -57,7 +57,7 @@ TimeoutStartSec=5min
EOF
- cat > /lib/systemd/system/cloud.service << EOF
+ cat > /etc/systemd/system/cloud.service << EOF
[Unit]
Description=cloud: startup cloud service
After=cloud-early-config.service network.target local-fs.target
@@ -66,14 +66,14 @@ After=cloud-early-config.service network.target local-fs.target
WantedBy=multi-user.target
[Service]
-Type=forking
-ExecStart=/etc/init.d/cloud start
-ExecStop=/etc/init.d/cloud stop
-RemainAfterExit=true
-TimeoutStartSec=5min
+Type=simple
+WorkingDirectory=/usr/local/cloud/systemvm
+ExecStart=/usr/local/cloud/systemvm/_run.sh
+Restart=always
+RestartSec=5
EOF
- cat > /lib/systemd/system/cloud-passwd-srvr.service << EOF
+ cat > /etc/systemd/system/cloud-passwd-srvr.service << EOF
[Unit]
Description=cloud-passwd-srvr: cloud password server
After=network.target local-fs.target
@@ -89,7 +89,7 @@ RemainAfterExit=true
TimeoutStartSec=5min
EOF
- cat > /lib/systemd/system/postinit.service << EOF
+ cat > /etc/systemd/system/postinit.service << EOF
[Unit]
Description=cloud post-init service
After=cloud-early-config.service network.target local-fs.target
@@ -107,8 +107,8 @@ EOF
systemctl daemon-reload
systemctl enable cloud-early-config
- systemctl disable cloud-passwd-srvr
- systemctl disable cloud
+ systemctl enable cloud-passwd-srvr
+ systemctl enable cloud
}
function do_signature() {
--
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>.
[cloudstack] 06/07: Ignore files from build of SSVM
Posted by bh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit b2db1d96b811b90a5a6183b79b6e462d5153b187
Author: Wido den Hollander <wi...@widodh.nl>
AuthorDate: Fri Aug 11 09:31:48 2017 +0200
Ignore files from build of SSVM
Signed-off-by: Wido den Hollander <wi...@widodh.nl>
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index 29b4ffc..1a73724 100644
--- a/.gitignore
+++ b/.gitignore
@@ -97,3 +97,5 @@ systemvm/.pydevproject
test/.pydevprojec
plugins/hypervisors/kvm/.pydevproject
scripts/.pydevproject
+*.qcow2
+*.raw
--
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>.
[cloudstack] 05/07: Disable most services by default and enable in
cloud-early-config
Posted by bh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 790dcb66de1ed35171ea730186764badfb8799a9
Author: Wido den Hollander <wi...@widodh.nl>
AuthorDate: Thu Aug 10 16:40:22 2017 +0200
Disable most services by default and enable in cloud-early-config
Not sure though if enabling them is enough for systemd to still start them
on first boot
Signed-off-by: Wido den Hollander <wi...@widodh.nl>
---
.../debian/config/etc/init.d/cloud-early-config | 35 +++++-----------------
.../configure_systemvm_services.sh | 6 ++--
2 files changed, 11 insertions(+), 30 deletions(-)
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index 1d3a890..655266c 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -935,11 +935,8 @@ setup_router() {
echo "$ETH0_IP $NAME" >> /etc/hosts
- enable_svc dnsmasq 1
- enable_svc haproxy 1
+ systemctl enable dnsmasq haproxy cloud-passwd-srvr
enable_irqbalance 1
- enable_svc cloud-passwd-srvr 1
- enable_svc cloud 0
disable_rpfilter_domR
enable_fwding 1
enable_rpsrfs 1
@@ -1028,12 +1025,9 @@ EOF
setup_vpc_apache2
- enable_svc dnsmasq 1
- enable_svc haproxy 1
+ systemctl enable dnsmasq haproxy cloud-passwd-srvr
enable_irqbalance 1
enable_vpc_rpsrfs 1
- enable_svc cloud 0
- enable_svc cloud-passwd-srvr 1
disable_rpfilter
enable_fwding 1
cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4
@@ -1078,11 +1072,8 @@ setup_dhcpsrvr() {
[ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts
[ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts
- enable_svc dnsmasq 1
- enable_svc haproxy 0
+ systemctl enable dnsmasq cloud-passwd-srvr
enable_irqbalance 0
- enable_svc cloud-passwd-srvr 1
- enable_svc cloud 0
enable_fwding 0
systemctl disable nfs-common
@@ -1208,11 +1199,9 @@ CORS
disable_rpfilter
enable_fwding 0
- enable_svc haproxy 0
+ systemctl disable haproxy dnsmasq cloud-passwd-srvr
+ systemctl enable cloud
enable_irqbalance 0
- enable_svc dnsmasq 0
- enable_svc cloud-passwd-srvr 0
- enable_svc cloud 1
rm /etc/logrotate.d/cloud
setup_ntp
}
@@ -1233,13 +1222,10 @@ setup_console_proxy() {
setup_sshd $ETH0_IP "eth0"
fi
+ systemctl enable cloud
disable_rpfilter
enable_fwding 0
- enable_svc haproxy 0
enable_irqbalance 0
- enable_svc dnsmasq 0
- enable_svc cloud-passwd-srvr 0
- enable_svc cloud 1
systemctl disable nfs-common
rm /etc/logrotate.d/cloud
}
@@ -1263,11 +1249,7 @@ setup_elbvm() {
fi
enable_fwding 0
- enable_svc haproxy 0
enable_irqbalance 0
- enable_svc dnsmasq 0
- enable_svc cloud-passwd-srvr 0
- enable_svc cloud 0
systemctl disable nfs-common
systemctl disable portmap
}
@@ -1286,11 +1268,8 @@ setup_ilbvm() {
setup_sshd $ETH1_IP "eth1"
enable_fwding 0
- enable_svc haproxy 1
+ systemctl enable haproxy
enable_irqbalance 1
- enable_svc dnsmasq 0
- enable_svc cloud-passwd-srvr 0
- enable_svc cloud 0
systemctl disable nfs-common
systemctl disable portmap
}
diff --git a/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh b/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
index 171c4b0..1386465 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
@@ -107,8 +107,8 @@ EOF
systemctl daemon-reload
systemctl enable cloud-early-config
- systemctl enable cloud-passwd-srvr
- systemctl enable cloud
+ systemctl disable cloud-passwd-srvr
+ systemctl disable cloud
}
function do_signature() {
@@ -143,6 +143,8 @@ function configure_services() {
systemctl disable x11-common
systemctl disable console-setup
systemctl disable haproxy
+ systemctl disable apache2
+ systemctl disable dnsmasq
# Hyperv kvp daemon - 64bit only
local arch=`dpkg --print-architecture`
--
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>.