30144 Commits

Author SHA1 Message Date
Daan Hoogland
00add83749 remaining conflicting code for vm_passwd speedup 2017-05-06 22:12:36 +02:00
Remi Bergsma
9a21f56f8a Speedup vm start by making vm_passwd saving much faster
- do not keep passwords in databag (/etc/cloudstack/vmpasswd.json)
- process only the password we get in (vm_password.json) from mgt server
- lookup the correct passwd server instead of adding passwd to all of them

Example:
- 4 tiers and 199 VMs running
- Start vm 200 would cause new passwd from vm_password.json (1) to be merged with /etc/cloudstack/vmpasswd.json (199)
- A curl command was exected foreach password (200) foreach tier (4) resulting in 800 calls
- In fact, since passwds are never cleaned it could very well be even more as the ip address was the key in the json file so until the ip address was reused the original password would remain and be sent to passwd server every time another vm starts.
- This took ~40 seconds

Now we just figure out the right tier and only process the new password resulting in a single curl call.
- takes 0,03 seconds!
2017-05-06 21:48:25 +02:00
Rajani Karuturi
bdc4fd700b Merge pull request #1810 from sudhansu7/CLOUDSTACK-9647
CLOUDSTACK-9647: NIC adapter type becomes e1000 , even after changing…
2017-05-02 11:17:19 +05:30
Rajani Karuturi
cab0869bd4 Merge pull request #2037 from wido/sql_mode
CLOUDSTACK-9871: Set SQL Mode in SQL Session for MySQL 5.7 compatibility
2017-04-27 11:16:33 +05:30
Rajani Karuturi
a5963f2d86 Merge pull request #2009 from Accelerite/CLOUDSTACK-9369
CLOUDSTACK-9369 Fixed Ldap regression
2017-04-23 09:41:15 +05:30
Rajani Karuturi
1be37e41ed Merge pull request #1819 from Accelerite/ListCapacityIssue
CLOUDSTACK-9653 The system capacity was not getting calculated correctly
2017-04-22 21:10:51 +05:30
Rajani Karuturi
6cba86dd5e Merge pull request #1879 from Accelerite/CLOUDSTACK-9719
CLOUDSTACK-9719: [VMware] VR loses DHCP settings and VMs cannot obtain IP after HA recovery - Set high restart priority for the VR.
2017-04-22 21:10:26 +05:30
Rajani Karuturi
f2951d9560 Merge pull request #1956 from myENA/bug/49npe_vmimpl
CLOUDSTACK-9796 - Fix NPE in VirtualMachineManagerImpl.java
2017-04-22 20:53:27 +05:30
Rajani Karuturi
5fcf648e7e Merge pull request #1903 from ustcweizhou/vpc-vpn-add-user
[4.9] CLOUDSTACK-9356: FIX Cannot add users in VPC VPN
2017-04-20 15:53:00 +05:30
Rajani Karuturi
d082226d3a Merge pull request #2024 from shapeblue/CLOUDSTACK-9857
CLOUDSTACK-9857: With this change if agent dies the systemd will catc…
2017-04-20 15:43:04 +05:30
Rajani Karuturi
5dd814ae70 Merge pull request #1980 from shapeblue/vr-ui-tab
CLOUDSTACK-9805: Display VR list in network details
2017-04-20 15:29:59 +05:30
Rajani Karuturi
b40098d3b3 Bug-ID:CLOUDSTACK-9369 Fixed Ldap regression
Ldap auto creation of accounts is broken due to the security fix for
CLOUDSTACK-9369.
There was an explicit check to not allow login incase the
user doesnt exist. removed the same.
2017-04-20 15:25:47 +05:30
Rajani Karuturi
41b7eee2cb Merge pull request #2043 from anshul1886/CLOUDSTACK-9876
CLOUDSTACK-9876: Removed test test_01_test_vm_volume_snapshot
2017-04-18 15:12:02 +05:30
Anshul Gangwar
e82a6351a1 CLOUDSTACK-9876: Removed test test_01_test_vm_volume_snapshot as we no longer have that restriction and now after fix for CLOUDSTACK-8663 we allow VM and volume snapshots to exist together 2017-04-17 12:44:44 +05:30
Wido den Hollander
0c1c27ba85
CLOUDSTACK-9871: Set SQL Mode in SQL Session for MySQL 5.7 compatibility
MySQL 5.7 has a more strict SQL mode by default with which CloudStack
is not compatible.

By setting the SQL Mode to a more relaxed mode on run-time we can
run without changing any SQL server settings.

Admins could also apply this to the [mysqld] section of their my.cnf:

sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2017-04-12 15:13:08 +02:00
Rajani Karuturi
96700a04a9 Merge pull request #2022 from shapeblue/4.9-systemvm-fix-vmware-portgroups
[dvswitch blocker] CLOUDSTACK-9591: Fix systemvmtemplate to not include network detailsThis removes nic/network specific details while exporting the systemvmtemplate for vmware (ova file). Having this causes the ssvms to not deploy in dvswitch-based vmware environments that have no vswitch portgroups (dummy etc). Tested this on a local Trillian env.

* pr/2022:
  CLOUDSTACK-9591: Fix guest VM ovf xml to remove network nodes
  CLOUDSTACK-9591: Fix systemvmtemplate to not include network details

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-04-12 10:05:57 +05:30
Suresh Kumar Anaparti
bf77c07797 CLOUDSTACK-9719: [VMware] VR loses DHCP settings and VMs cannot obtain IP after HA recovery - Set high restart priority for the VR.
Test scenarios:
- Enable cluster HA after VR is created. Now stop and start VR and check its restart priority, should be High.
- Enable cluster HA before VR is created. Now create some VM and verify that VR created must have High restart priority.
2017-04-11 10:48:42 +05:30
Abhinandan Prateek
e5bfffb48c CLOUDSTACK-9857: With this change if agent dies the systemd will catch it properly and show process as exited
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-04-06 13:07:53 +05:30
Rajani Karuturi
6548839417 Merge pull request #1944 from shapeblue/4.9-metrics-enhancement
CLOUDSTACK-9783: Improve metrics view performanceThis improves the metrics view feature by improving the rendering performance
of metrics view tables, by re-implementing the logic at the backend and data
served via APIs. In large environments, the older implementation would
make several API calls that increases both network and database load.

List of APIs introduced for improving the performance that re-implement the frontend logic at backend:

    listClustersMetrics
    listHostsMetrics
    listInfrastructure
    listStoragePoolsMetrics
    listVMsMetrics
    listVolumesMetrics
    listZonesMetrics

Pinging for review - @abhinandanprateek @DaanHoogland @borisstoyanov @karuturi @rashmidixit

Marvin test results:

=== TestName: test_list_clusters_metrics | Status : SUCCESS ===

=== TestName: test_list_hosts_metrics | Status : SUCCESS ===

=== TestName: test_list_infrastructure_metrics | Status : SUCCESS ===

=== TestName: test_list_pstorage_metrics | Status : SUCCESS ===

=== TestName: test_list_vms_metrics | Status : SUCCESS ===

=== TestName: test_list_volumes_metrics | Status : SUCCESS ===

=== TestName: test_list_zones_metrics | Status : SUCCESS ===

* pr/1944:
  CLOUDSTACK-9783: Improve metrics view performance

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-04-06 12:04:29 +05:30
Rohit Yadav
00e1b462f6 CLOUDSTACK-9591: Fix guest VM ovf xml to remove network nodes
This removes network details from the guest VM template OVF xml before deploying
a VM which would fail in case of dvswitch-based vmware environment with no
dummy/existing vswitch.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-03-30 18:01:46 +05:30
Rohit Yadav
92fd5bee3d CLOUDSTACK-9591: Fix systemvmtemplate to not include network details
This removes nic/network specific details while exporting the systemvmtemplate
for vmware (ova file). Having this causes the ssvms to not deploy in
dvswitch-based vmware environments that have no vswitch portgroups (dummy etc).
Tested this on a local Trillian env.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-03-30 13:47:53 +05:30
Rohit Yadav
0ddcf0b175 CLOUDSTACK-9805: Display VR list in network details
Displays a VR tab that lists VRs for the network in the detail views for
isolated networks, shared networks and for VPCs.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-03-26 14:27:22 +05:30
Rajani Karuturi
9bf428162d Merge pull request #2011 from ustcweizhou/fix-issue-p55p1
CLOUDSTACK-9811: fix duplicated nics on VR caused by nic name p<slot_number>p<port_number>

* pr/2011:
  CLOUDSTACK-9811: fix duplicated nics on VR caused by nic name p<slot_number>p<port_number>

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-03-23 15:18:54 +05:30
Wei Zhou
bf93b6313e CLOUDSTACK-9811: fix duplicated nics on VR caused by nic name p<slot_number>p<port_number> 2017-03-20 07:32:31 +01:00
Rajani Karuturi
929c8231c5 Merge pull request #1923 from resmo/fix/centos-spec-upgrade-db-properties
CLOUDSTACK-9765: centos: packaging: fix missing path in spec fileRelated to 6051fa503a2da7b96256f21e6b7c42aa1f3cb01e

/cc @rhtyd (shapeblue)

* pr/1923:
  CLOUDSTACK-9765: centos: packaging: fix missing path in spec file post install

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-03-15 10:51:36 +05:30
Rajani Karuturi
7b719c71fc Merge pull request #1856 from ustcweizhou/set-kvm-host-params
[4.9] CLOUDSTACK-9569: propagate global configuration router.aggregation.command.each.timeout to KVM agentThe router.aggregation.command.each.timeout in global configuration is only applied on new created KVM host.
For existing KVM host, changing the value will not be effective.
We need to propagate the configuration to existing host when cloudstack-agent is connected.

* pr/1856:
  CLOUDSTACK-9569: propagate global configuration router.aggregation.command.each.timeout to KVM agent

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-03-13 22:08:47 +05:30
David Mabry
3e54388858 moved logrotate from cron.daily to cron.hourly for vpcrouter in cloud-early-config
(cherry picked from commit 450deed8472c06c4fec88e045bef28091502c638)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-03-03 14:00:43 +05:30
Rajani Karuturi
63589859d0 Merge pull request #1896 from milamberspace/L10N-update-4.9-20170106
[CLOUDSTACK-9732] Update L10N resource files with 4.9 strings from Transifex (20170106)(PR with 4.9 branch)

Related to: http://markmail.org/message/lywieba2nxlrbyzf?q=list:org.apache.incubator.cloudstack-*+[VOTE]+Apache+Cloudstack+4.9.2.0+%28RC2%29

And update the others language too

cc @rhtyd @rafaelweingartner

* pr/1896:
  Update L10N resource files with 4.9 strings from Transifex (20170223)

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-28 17:22:42 +05:30
Rohit Yadav
402253504e CLOUDSTACK-9783: Improve metrics view performance
This improves the metrics view feature by improving the rendering performance
of metrics view tables, by reimplementing the logic at the backend and data
served via APIs. In large environments, the older implementation would
make several API calls that increases both network and database load.

List of APIs introduced for improving the performance:

    listClustersMetrics
    listHostsMetrics
    listInfrastructure
    listStoragePoolsMetrics
    listVMsMetrics
    listVolumesMetrics
    listZonesMetrics

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-02-28 13:45:03 +05:30
Rajani Karuturi
b95bf8fcd8 Merge release branch 4.8 to 4.9
* 4.8:
  CLOUDSTACK-9746 system-vm: logrotate config causes critical failures
2017-02-28 05:45:31 +05:30
Rajani Karuturi
113ce13bda Merge pull request #1915 from serbaut/CLOUDSTACK-9746
CLOUDSTACK-9746 system-vm: logrotate config causes critical failures* rotate both daily and by size by using maxsize in stead of size
* decrease the max size to 10M for rsyslog files
* remove delaycompress for rsyslog files
* increase rotate to 10 for cloud.log

* pr/1915:
  CLOUDSTACK-9746 system-vm: logrotate config causes critical failures

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-28 05:44:47 +05:30
Rajani Karuturi
d9bd01266f Merge pull request #1829 from syed/hvm-volume-attach-restart-fix
CLOUDSTACK-9363: Fix HVM VM restart bug in XenServerHere is the longer description of the problem:

By default XenServer limits HVM guests to only 4 disks. Two of those are reserved for the ROOT disk (deviceId=0) and CD ROM (device ID=3) which means that we can only attach 2 data disks. This limit however is removed when Xentools is installed on the guest. The information that a guest has Xentools installed and can handle more than 4 disks is stored in the VM metadata on XenServer. When a VM is shut down, Cloudstack removes the VM and all the metadata associated with the VM from XenServer. Now, when you start the VM again, even if it has Xentools installed, it will default to only 4 attachable disks.

Now this problem manifests itself when you have a HVM VM and you stop and start it with more than 2 data disks attached. The VM fails to start and the only way to start the VM is to detach the extra disks and then reattach them after the VM start.

In this fix, I am removing the check which is done before creating a `VBD` which enforces this limit. This will not affect current workflow and will fix the HVM issue.

@koushik-das this is related to the "autodetect" feature that you introduced a while back (https://issues.apache.org/jira/browse/CLOUDSTACK-8826). I would love your review on this fix.

* pr/1829:
  Fix HVM VM restart bug in XenServer

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-28 05:42:59 +05:30
Rajani Karuturi
ea7c48cf61 Merge pull request #1941 from anshul1886/CLOUDSTACK-8663
CLOUDSTACK-8663: Fixed various issues to allow VM snapshots and volumesnapshots to exist together

Reverting VM to disk only snapshot in Xenserver corrupts VM

Stale NFS secondary storage on XS leads to volume creation failure from snapshot

Fixed various concerns raised in #672

* pr/1941:
  CLOUDSTACK-8663: Fixed various issues to allow VM snapshots and volume snapshots to exist together

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-28 05:39:34 +05:30
Rajani Karuturi
c4d63af149 Merge pull request #1946 from ustcweizhou/pagesizeIs0
CLOUDSTACK-9788: Fix exception listNetworks with pagesize=0

* pr/1946:
  CLOUDSTACK-9788: Fix exception listNetworks with pagesize=0

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-28 05:35:52 +05:30
Milamber
d4bb1753f0 Update L10N resource files with 4.9 strings from Transifex (20170223) 2017-02-23 06:57:29 +00:00
Rajani Karuturi
c6f0ba76b1 Merge pull request #1947 from ustcweizhou/RemoveSecondaryIP
CLOUDSTACK-9789: Fix releasing secondary guest IP fails with associated static nat which is actually not used

* pr/1947:
  CLOUDSTACK-9789: Fix releasing secondary guest IP fails with associated static nat which is actually not used

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-23 06:05:56 +05:30
Rajani Karuturi
f3d38be808 Merge pull request #1770 from syed/tmpl-virt-size
CLOUDSTACK-9628: Fix Template Size in Swift as Secondary StorageCloudstack incorrectly uses the physical size as the size of the
template. Ideally, the size should refelct the virtual size. This
PR fixes that issue.

* pr/1770:
  CLOUDSTACK-9628: Use correct virtualsize with Swift as secondary storage

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-23 06:04:34 +05:30
Joakim Sernbrant
5604b4c59e CLOUDSTACK-9746 system-vm: logrotate config causes critical failures
* rotate both daily and by size by using maxsize in stead of size
* decrease the max size to 10M for rsyslog files
* remove delaycompress for rsyslog files
* increase rotate to 10 for cloud.log
2017-02-22 11:04:52 +01:00
Nathan Johnson
91bfedd2c7 CLOUDSTACK-9796 - Fix NPE in VirtualMachineManagerImpl.java
This checks the work variable for NULL in all cases where it is
used.  Fixes CLOUDSTACK-9796.
2017-02-21 14:31:39 -06:00
Rajani Karuturi
e860249e4f Merge pull request #1847 from anshul1886/CLOUDSTACK-9691
CLOUDSTACK-9691: Fixed unhandeled excetion in list snapshot command when a primary store is deleted related to it@mike-tutkowski After support for snapshots on solidifire there are many places which are prone to these NullPointer exceptions resulting in various issues. Root cause for these issues is that we get the primary storage associated with snapshot and then figure out how to handle but if that store is deleted then it results in NullPointer exceptions. Without solidfire we don't need to access primary storage.

Should we handle that as issues are found or could there be other way to fix all of these issues?

* pr/1847:
  CLOUDSTACK-9691: Added test list_snapshots_with_removed_data_store
  CLOUDSTACK-9691: Fixed unhandeled excetion in list snapshot command when a primary store is deleted related to it

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-20 16:25:15 +05:30
Nicolas Vazquez
3caedb9ef3 CLOUDSTACK-9691: Added test list_snapshots_with_removed_data_store 2017-02-20 11:30:30 +05:30
Anshul Gangwar
2fd28f2bff CLOUDSTACK-9691: Fixed unhandeled excetion in list snapshot command when
a primary store is deleted related to it
2017-02-20 11:30:02 +05:30
Wei Zhou
0f054246b6 CLOUDSTACK-9789: Fix releasing secondary guest IP fails with associated static nat which is actually not used 2017-02-16 14:18:56 +01:00
Wei Zhou
c883e294d3 CLOUDSTACK-9788: Fix exception listNetworks with pagesize=0 2017-02-16 14:08:21 +01:00
Rajani Karuturi
6dced70aa8 Merge pull request #1818 from Accelerite/CLOUDSTACK-9655
CLOUDSTACK-9655 The template which is registered in all zones will be deleted by deleting 1 template on any zoneadded extra warning message if it's a cross-zone template ("This is a
cross zone template and will be deleted from all the zones. Are you sure
you want to proceed?").

* pr/1818:
  CLOUDSTACK-9655 The template which is registered in all zones will be deleted by deleting 1 template on any zone

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-16 10:38:35 +05:30
Anshul Gangwar
ca84fd4ffd CLOUDSTACK-8663: Fixed various issues to allow VM snapshots and volume
snapshots to exist together

Reverting VM to disk only snapshot in Xenserver corrupts VM

Stale NFS secondary storage on XS leads to volume creation failure from snapshot
2017-02-15 12:56:39 +05:30
Rajani Karuturi
abd7860e68 Merge pull request #873 from karuturi/CLOUDSTACK-8896
CLOUDSTACK-8896: allocated percentage of storage pool going beyond 100%This issue occurs when a volume in Ready state is moved across storage
pools.

While finding if the storage pool has enough space, it has a check to
consider the size of non Ready volumes only. This is true if the volume
to be attached to a vm is in the same storage pool. But, if the volume
is in another storage pool and has to be moved to a vm's storage pool,
the size of the volume should be considered in doing the space check.

computing the asking size when volume is not in ready state or when the
volume is on a different storage pool.

Testing:
I couldnt write unittests for it. This class is not in a unittestable state.

manually tested in the below environment
1. xenserver 6.5 setup with 2 clusters and a host each in each of them.
2. added storage tags for the primary storage.
3. created two service offerings with the storage tags.
4. deployed two vms using newly created offerings in step 3.
5. at this stage, there are two vms one on each host with root disks on the corresponding primary.
6. create a data disk and attach it to vm1
7. detach the data disk. now the data disk is in the primary storage of the cluster of vm1 (let us say primary1)
8. attach this data disk to vm2(running on a host in different cluster)
9. the volume should be moved to the primary storage of another cluster and op_host_capacity should be accordingly updated.

* pr/873:
  CLOUDSTACK-8896: allocated percentage of storage pool going beyond 100%

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-14 14:43:36 +05:30
Rajani Karuturi
4f124b2775 CLOUDSTACK-9655 The template which is registered in all zones will be
deleted by deleting 1 template on any zone

added extra warning message if it's a cross-zone template ("This is a
cross zone template and will be deleted from all the zones. Are you sure
you want to proceed?").
2017-02-13 16:42:08 +05:30
Rajani Karuturi
bec9115a61 CLOUDSTACK-8896: allocated percentage of storage pool going beyond 100%
This issue occurs when a volume in Ready state is moved across storage
pools.

While finding if the storage pool has enough space, it has a check to
consider the size of non Ready volumes only. This is true if the volume
to be attached to a vm is in the same storage pool. But, if the volume
is in another storage pool and has to be moved to a vm's storage pool,
the size of the volume should be considered in doing the space check.

computing the asking size when volume is not in ready state or when the
volume is on a different storage pool.
2017-02-13 15:27:11 +05:30
Rajani Karuturi
01e78f980b Merge pull request #1929 from ustcweizhou/VR-missing-route
[4.9] CLOUDSTACK-9770: fix missing ip routes in VRIn network VR, the routes to current subnets are missing in corresponding ip route Table.
It is a typo in commit 6749785caba78a9379e94bf3aaf0c1fbc44c5445
In VPC VR, it works fine.

* pr/1929:
  CLOUDSTACK-9770: fix missing ip routes in VR

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-08 15:02:09 +05:30