36590 Commits

Author SHA1 Message Date
Wei Zhou
9d748f0837
server: update default value of setting 'expose.dns.externally' to 'false' (#8776) 2024-03-15 10:43:16 -03:00
Bernardo De Marco Gonçalves
e0731c5098
Fix the removal of network offering tags (#8758) 2024-03-15 13:59:19 +01:00
Abhishek Kumar
0780f0e5c6 Merge remote-tracking branch 'apache/4.18' into 4.19 2024-03-15 14:54:07 +05:30
Nicolas Vazquez
f25d35c5d6
VM Import: Use datastore name when datastore path is not set to search for pools on DB (#8759) 2024-03-14 22:07:23 -03:00
Vishesh
f8fd22c2d6
Usage: Fixup entity exists exception (#8726) 2024-03-12 09:08:41 +01:00
Fabricio Duarte
d487a1c341
Fix disk offering override in VM deployment wizard (#8070)
* Fix disk offering override in VM deployment wizard

* Reduce indentation
2024-03-08 16:10:24 -03:00
Abhishek Kumar
0208e094ce build: fix failure after latest forward-merge
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-03-08 15:21:49 +05:30
Rene Peinthor
001c769054
Linstor 4.19 fix selecting non enabled hosts (#8653)
* linstor: cleanup resource if copy from template failed

* linstor: do not use non enabled hosts for copy operations
2024-03-08 13:52:49 +05:30
Daan Hoogland
d99b1b9c2d Merge branch '4.18' into 4.19 2024-03-08 08:19:49 +01:00
Bryan Lima
b82ea3de2d
Update pre-populated quota tariffs' unit types (#8591) 2024-03-06 17:36:22 +01:00
Henrique Sato
223a9b8031
Quota tariff events (#8030)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2024-03-06 17:33:39 +01:00
Wei Zhou
986d754768
SG: fix SQL exception when add security group rule with allowed account/group (#8616)
This fixes https://github.com/apache/cloudstack/issues/8595

```
2024-02-01 16:23:52,473 INFO  [c.c.n.s.SecurityGroupManagerImpl] (AgentManager-Handler-16:null) (logid:) Network Group full sync for agent 1 found 3 vms out of sync
2024-02-01 16:23:52,473 DEBUG [c.c.n.s.SecurityGroupManagerImpl] (AgentManager-Handler-16:null) (logid:) Security Group Mgr v2: scheduling ruleset updates for 3 vms  (unique=3), current queue size=0
2024-02-01 16:23:52,473 DEBUG [c.c.n.s.SecurityGroupManagerImpl] (AgentManager-Handler-16:null) (logid:) Security Group Mgr v2: done scheduling ruleset updates for 3 vms: num new jobs=3 num rows insert or updated=0 time taken=0
2024-02-01 16:23:52,478 ERROR [c.c.n.s.SecurityGroupManagerImpl] (SecGrp-Worker-20:ctx-0aa3885d) (logid:472b30d2) Problem during SG work com.cloud.network.security.LocalSecurityGroupWorkQueue$LocalSecurityGroupWork@5
com.cloud.utils.exception.CloudRuntimeException: DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT SQL_CACHE security_group_vm_map.id, security_group_vm_map.security_group_id, security_group_vm_map.instance_id, nics.ip4_address, vm_instance.state, security_group.name FROM security_group_vm_map INNER JOIN nics ON security_group_vm_map.instance_id=nics.instance_id  INNER JOIN vm_instance ON security_group_vm_map.instance_id=vm_instance.id  INNER JOIN security_group ON security_group_vm_map.security_group_id=security_group.id  WHERE security_group_vm_map.security_group_id = 3  AND vm_instance.state='Running'
        at com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:424)
        at com.cloud.utils.db.GenericDaoBase.listIncludingRemovedBy(GenericDaoBase.java:938)
        at com.cloud.utils.db.GenericDaoBase.listBy(GenericDaoBase.java:928)
        at com.cloud.network.security.dao.SecurityGroupVMMapDaoImpl.listBySecurityGroup(SecurityGroupVMMapDaoImpl.java:134)
        at jdk.internal.reflect.GeneratedMethodAccessor555.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
        at com.sun.proxy.$Proxy245.listBySecurityGroup(Unknown Source)
        at com.cloud.network.security.SecurityGroupManagerImpl2.generateRulesForVM(SecurityGroupManagerImpl2.java:246)
        at com.cloud.network.security.SecurityGroupManagerImpl2.sendRulesetUpdates(SecurityGroupManagerImpl2.java:177)
        at com.cloud.network.security.SecurityGroupManagerImpl2.work(SecurityGroupManagerImpl2.java:157)
        at com.cloud.network.security.SecurityGroupManagerImpl2$WorkerThread$1.run(SecurityGroupManagerImpl2.java:75)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
        at com.cloud.network.security.SecurityGroupManagerImpl2$WorkerThread.run(SecurityGroupManagerImpl2.java:72)
Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.id, security_group_vm_map.security_group_id, security_group_vm_map.instance_id,' at line 1
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
        ... 28 more
```
2024-03-06 08:25:00 +01:00
Wei Zhou
a7ec8738a2
kvm: fix NPE while import KVM VMs from other hosts (#8720) 2024-03-04 09:46:28 +01:00
Suresh Kumar Anaparti
0b080cfd82
[UI] Allow detach ISO from instance toolbar when ISO is attached (#8716) 2024-03-04 09:43:32 +01:00
Wei Zhou
e86363be8e Merge remote-tracking branch 'apache/4.18' into 4.19 2024-03-04 09:06:53 +01:00
Wei Zhou
10f72a17f6
server: use ecdsa instead of ed25519 when generate public/private keys (#8719)
PR #8549 replaced RSA with ed25519. unfornately, ed25519 is unsupported in FIPS mode

```
$  ssh-keygen -t ed25519 -m PEM -N '' -f key1
ED25519 keys are not allowed in FIPS mode

$  ssh-keygen -t ecdsa -m PEM -N '' -f key1
Generating public/private ecdsa key pair.
Your identification has been saved in key1
Your public key has been saved in key1.pub
The key fingerprint is:
.........

```
2024-03-03 15:56:13 +01:00
Abhishek Kumar
9fd410be36 Merge remote-tracking branch 'apache/4.18' into 4.19 2024-03-01 17:34:27 +05:30
Suresh Kumar Anaparti
813d53d031
Sync the pool stats in DB with the actual stats from stats collector (#8686) 2024-02-29 15:26:32 +05:30
Harikrishna
c462be1412
New API "checkVolume" to check and repair any leaks or issues reported by qemu-img check (#8577)
* Introduced a new API checkVolumeAndRepair that allows users or admins to check and repair if any leaks observed.
Currently this is supported only for KVM

* some fixes

* Added unit tests

* addressed review comments

* add repair volume while granting access

* Changed repair parameter to accept both leaks/all

* Introduced new global setting volume.check.and.repair.before.use to do volume check and repair before VM start or volume attach operations

* Added volume check and repair changes only during VM start and volume attach operations

* Refactored the names to look similar across the code

* Some code fixes

* remove unused code

* Renamed repair values

* Fixed unit tests

* changed version

* Address review comments

* Code refactored

* used volume name in logs

* Changed the API to Async and the setting scope to storage pool

* Fixed exit value handling with check volume command

* Fixed storage scope to the setting

* Fix volume format issues

* Refactored the log messages

* Fix formatting
2024-02-29 14:41:49 +05:30
Vishesh
9bd359a039
UI: Fix error message in zone wizard (#8721) 2024-02-28 19:00:56 +05:30
Vishesh
52d5b27161
UI: Add button to show public IPs associated with vlanid (#8717) 2024-02-28 11:34:03 +01:00
dahn
56e0450526
Logging improvements on migration in the VmwareResource (#8300) 2024-02-28 15:29:35 +05:30
Wei Zhou
45d267ccbf
UI: fix permission of VNF appliances (#8668) 2024-02-27 12:35:21 +01:00
dahn
4e34e6b334
console proxy client sleep more generic (#8694)
* Make wait in the noVNC console proxy client more generic

* Update services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java

Co-authored-by: Wei Zhou <weizhou@apache.org>

---------

Co-authored-by: Wei Zhou <weizhou@apache.org>
2024-02-27 11:54:05 +05:30
Vishesh
bbe56ae283
Update actions/setup-java from v3 to v4 (#8709) 2024-02-27 11:46:20 +05:30
Daan Hoogland
f4987bf8ee Merge release branch 4.18 to 4.19
* 4.18:
  Storage plugin support to check if volume on datastore requires access for migration (#8655)
  CKS: fix /opt/bin/deploy-cloudstack-secret in CKS control nodes (#8697)
2024-02-26 15:53:11 +01:00
Suresh Kumar Anaparti
f731fe882c
Storage plugin support to check if volume on datastore requires access for migration (#8655)
* Check if volume on datastore requires access for migration, and grant/revoke volume access if requires

* Updated default implementation for requiresAccessForMigration method in PrimaryDataStoreDriver
2024-02-26 20:16:31 +05:30
Abhishek Kumar
b4404fbcc7
db: fix wrong cloud.domain_view (#8705) 2024-02-26 14:47:41 +01:00
Vishesh
08dc1bbcd4
UI: cleanup arrangement of instance schedule modal dialog (#8620)
* polish modal for instance schedule

* fixup
2024-02-26 14:40:01 +01:00
Harshit Soni
e545259bd3
Added JS Script to pick Favicon, Title from config file (#7418) 2024-02-26 14:27:54 +01:00
Wei Zhou
18c3d470c6
CKS: fix /opt/bin/deploy-cloudstack-secret in CKS control nodes (#8697) 2024-02-26 14:21:26 +01:00
Abhishek Kumar
2a56c61ade Merge remote-tracking branch 'apache/4.18' into 4.19 2024-02-26 12:01:26 +05:30
Oleg Chuev
3aafb286b9
Fixed deleteVlanIpRange API description (#8700)
Updates deleteVlanIpRange API description
2024-02-26 12:00:14 +05:30
Wei Zhou
ed579bfeca
UI: remove duplicated section for backup (#8678) 2024-02-23 09:00:52 +01:00
Vishesh
e09fd2e26b
Fixup: Optimize getRouterHealthChecksConfig method (#8677) 2024-02-21 09:24:11 +01:00
Vishesh
1a1131154e
Fixup vm powerstate update (#8545)
Co-authored-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
2024-02-19 13:56:21 +01:00
Phsm Qwerty
af942e2260
vpc: optimize createMonitorServiceCommand() execution (#8385)
* Optimize createMonitorServiceCommand() execution.
Avoid an expensive getRouterHealthChecksConfig() execution multiple times during VPC restart.

Fixes #8055

* Move getRouterHealthChecksConfig() outside of loop
2024-02-19 11:07:48 +01:00
Henrique Sato
275abaff6b
Refactor updateDiskOffering API (#8446)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2024-02-19 10:29:45 +01:00
Wei Zhou
e74a72b4ef
test: fix test_guest_os.py failure on xcpng82 (#8659)
on xenserver-71, supported Debian OSes are
```
          name-label ( RW): Debian Squeeze 6.0 (32-bit)
          name-label ( RW): Debian Jessie 8.0
          name-label ( RW): Debian Wheezy 7.0 (32-bit)
          name-label ( RW): Debian Squeeze 6.0 (64-bit)
          name-label ( RW): Debian Wheezy 7.0 (64-bit)
```

on xcpng82, supported Debian OSes are
```
          name-label ( RW): Debian Jessie 8.0
          name-label ( RW): Debian Buster 10
          name-label ( RW): Debian Stretch 9.0
```
2024-02-17 09:32:37 +01:00
dahn
e9416c4987
Move views into separate files for easier modification (#8647)
* volume view in separate file for easier modification

* eof

* remaining views

* lintworm
2024-02-17 09:31:43 +01:00
Wei Zhou
8d4b4dcec4
CKS: add kube config path in extra control nodes (#8658) 2024-02-16 15:01:27 +01:00
dahn
a0e592e945
prevent nic removal on out of bounds router stop (#8371)
Co-authored-by: Vishesh <vishesh92@gmail.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2024-02-16 14:33:22 +01:00
GaOrtiga
6f3e4e6302
fix_filter_and_pagination (#8306)
Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
2024-02-16 11:15:55 +01:00
Wei Zhou
f86c62e49a
UI: load domain lists only if listDomains API is available (#8660) 2024-02-15 16:36:16 +05:30
Wei Zhou
17516fd989
test: skip check for volume stats history on xenserver (#8661) 2024-02-15 16:32:49 +05:30
Rohit Yadav
bda49ab08f Merge remote-tracking branch 'shapeblue/merged-4-18' into 4.19 2024-02-13 12:54:24 +05:30
Vishesh
a8028eecbd
Merge remote-tracking branch 'origin/4.18' into 4.19 2024-02-13 11:44:20 +05:30
Vishesh
1955d8f3db
Add advance settings to fine tune DRS imbalance calculation (#8521)
* Use free/total instead of free metric to calculate imbalance

* Filter out hosts for condensed while checking imbalance

* Make DRS more configurable

* code refactor

* Add unit tests

* fixup

* Fix validation for drs.imbalance.condensed.skip.threshold

* Add logging and other minor changes for drs

* Add some logging for drs

* Change format for drs imbalance to string

* Show drs imbalance as percentage

* Fixup label for memorytotal in en.json
2024-02-13 11:18:53 +05:30
Rene Peinthor
70b634fff2
Linstor: add HA support and small cleanups (#8407)
* linstor: Outline get storagepools from resourcegroup into function

* linstor: move getHostname() to kvm/Pool and reimplement

* linstor: implement CloudStack HA support
2024-02-13 11:16:12 +05:30
Henrique Sato
d7362dd332
Migrating volumes filter (#8631)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2024-02-13 11:08:36 +05:30