36107 Commits

Author SHA1 Message Date
Rene Peinthor
ea11128cb3
linstor: disconnect-disk also search for resource name in Linstor (#9035)
disconnectPhysicalDisk(String, KVMStoragePool) seems to calls the plugin
with the resource name instead of the device path, so we also have
to search for resource names, while cleaning up.
2024-05-06 09:05:31 +02:00
Vishesh
5c9d79e3fb
Upgrade org.json:json version (#8750) 2024-04-30 18:23:51 +05:30
Rene Peinthor
9d5d4e5564
linstor: cleanup diskless nodes on disconnect (#8790) 2024-04-26 14:25:07 +02:00
dahn
eead2710f8
explanatory error message on delete attempt of default system offering (#8883)
Co-authored-by: Gabriel Pordeus Santos <gabrielpordeus@gmail.com>
2024-04-25 16:45:42 +02:00
João Jandre
cec6ade257
change live migration API used on kvm (#8952) 2024-04-25 09:35:25 +02:00
Wei Zhou
0e08a126df
systemvm: add template_zone_ref record when add a new zone with same hypervisor type (#8395) 2024-04-25 08:41:59 +02:00
Rohit Yadav
77df9ad4d7 codecov: fix Github action workflow
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-04-25 09:43:50 +05:30
Wei Zhou
3b0e6ac90c
VR: fix dnmasq misconfiguration if there are multiple IP ranges in a shared network (#8741) 2024-04-24 14:51:50 +02:00
Wei Zhou
5f6acca049
packaging: move contrail network plugin to noredist (#8932) 2024-04-24 10:28:59 +02:00
Wei Zhou
65f57124f5
UI: ignore error when list public ips for CKS clusters on Shared network (#8489) 2024-04-23 15:12:57 +02:00
dahn
0577b0ac8e
server: add logs to public ip allocation attempt (#8239) 2024-04-22 10:31:48 +02:00
Rene Peinthor
405aac38bc
linstor: Only set allow-two-primaries if resource is already in use (#8802)
For live migrate we need the allow-two-primaries option,
but we don't know exactly if we are called for a migration operation.
Now also check if at least any of the resources is in use somewhere and
only then set the option.
2024-04-22 10:04:05 +02:00
Rohit Yadav
5a52ca78ae
kvm: export sysinfo for arm64 domains for cloud-init to work (#8940)
This fixes a limitation for arm64/aarch64 KVM hosts to correctly export
the product name via sysconfig attribute. Without this `cloud-init`
doesn't function correctly on arm64 platforms.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-04-19 21:23:49 +02:00
dahn
7affbb1dac
protect against null-path (#8915)
Co-authored-by: Vladimir Dombrovski <vladimir.dombrovski@bso.co>
Co-authored-by: Vishesh <vishesh92@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2024-04-19 12:23:31 +02:00
Vishesh
d4a5459a83
UI: Fix missing locale strings for Status widget (#8792) 2024-04-19 11:31:51 +02:00
dahn
5f8450f28f
Add a shutdownhook to remove jobs owned by the process (#8896)
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2024-04-19 09:18:41 +02:00
João Jandre
8a101fbbc1 Updating pom.xml version numbers for release 4.18.3.0-SNAPSHOT
Signed-off-by: João Jandre <48719461+JoaoJandre@users.noreply.github.com>
2024-04-17 11:11:57 -03:00
João Jandre
154566f914 Updating pom.xml version numbers for release 4.18.2.0
Signed-off-by: João Jandre <48719461+JoaoJandre@users.noreply.github.com>
4.18.2.0
2024-04-12 08:25:04 -03:00
Rene Peinthor
6cd5c6a1d0
linstor: Do not pretend handling disconnect paths that are non Linstor (#8897) 2024-04-12 08:23:15 -03:00
Wei Zhou
a5508acc54
server: fix haproxy misconfiguration after VPC VR start (#8881) 2024-04-05 15:01:08 -03:00
Wei Zhou
7a9985b42b
upgrade: add unit tests from/to a security release (#8870)
* upgrade: add unit tests from/to a security release

* upgrade: add unit test from a old security release to a new security release
2024-04-04 14:55:29 +05:30
Abhishek Kumar
ff3e9bd821 engine-storage: control download redirection
Add a global setting to control whether redirection is allowed while
downloading templates and volumes

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-04-04 14:11:05 +05:30
dahn
00f687db1b api: client verification in servlet
This introduces new global settings to handle how client address checks
are handled by the API layer:

proxy.header.verify: enables/disables checking of ipaddresses from a
                     proxy set header
proxy.header.names: a list of names to check for allowed ipaddresses
                    from a proxy set header.
proxy.cidr: a list of cidrs for which \"proxy.header.names\" are
            honoured if the \"Remote_Addr\" is in this list.

(cherry picked from commit b65546636d84a5790e0297b1b0ca8e5a67a48dbc)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-04-04 11:00:33 +05:30
Wei Zhou
72b2eb0087 server: fix security issues caused by extraconfig on KVM
- Move allow.additional.vm.configuration.list.kvm from Global to Account setting
- Disallow VM details start with "extraconfig" when deploy VMs
- Skip changes on VM details start with "extraconfig" when update VM settings
- Allow only extraconfig for DPDK in service offering details
- Check if extraconfig values in vm details are supported when start VMs
- Check if extraconfig values in service offering details are supported when start VMs
- Disallow add/edit/update VM setting for extraconfig on UI

(cherry picked from commit e6e4fe16fb1ee428c3664b6b57384514e5a9252e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-04-04 11:00:10 +05:30
Wei Zhou
8c62365dbb
VPC VR: fix empty iptables if there is no vpc tier (#8787) 2024-03-19 14:45:24 -03:00
Rohit Yadav
720407ba73
snapshot: don't schedule next snapshot job for a removed volume (#8735)
* snapshot: don't schedule next snapshot job for a removed volume

When management server starts, it starts the snapshot scheduler. In case
there is a volume snapshot policy which exists for a volume which does
not exist, it can cause SQL constraint issue and cause the management
server to break from starting its various components and cause HTTP 503
error.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* remove schedule on missing volume

---------

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-03-19 09:01:58 -03:00
Wei Zhou
9d748f0837
server: update default value of setting 'expose.dns.externally' to 'false' (#8776) 2024-03-15 10:43:16 -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
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
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
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
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
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
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
Wei Zhou
18c3d470c6
CKS: fix /opt/bin/deploy-cloudstack-secret in CKS control nodes (#8697) 2024-02-26 14:21:26 +01:00
Vishesh
e09fd2e26b
Fixup: Optimize getRouterHealthChecksConfig method (#8677) 2024-02-21 09:24:11 +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
Wei Zhou
8d4b4dcec4
CKS: add kube config path in extra control nodes (#8658) 2024-02-16 15:01:27 +01:00
Wei Zhou
e47a910019
VR: fix issue between VPC VMs and other Public IPs in the same subnet as additional Public IPs (#8599)
* VR: fix issue between VPC VMs and other Public IPs in the same subnet as additional Public IPs

* Update PR8599: move to VpcVirtualNetworkApplianceManagerImpl
2024-02-13 11:03:40 +05:30
dahn
672206c312
kvm: ITCO watchdog added (#8282)
* ITCO watchdog added

* add inject-nmi action

* Update plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java

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

---------

Co-authored-by: Wei Zhou <weizhou@apache.org>
2024-02-12 08:54:39 +01:00
Vishesh
d8cd122849
zone wizard: allow only one untagged physical network with guest traffic type (#8625) 2024-02-09 16:31:06 +01:00
Rene Peinthor
393f3d7727
linstor: use relative hostname path (#8633)
As described in issue #8310 some older distributions don't have
hostname in /usr/bin so rely on PATH resolving
2024-02-09 11:49:20 +01:00
Daniel Augusto Veronezi Salvador
2729ee110e
Enable over provisioning for SharedMountPoint primary storages (#8481)
* Enable over provisioning for SharedMountPoint primary storages

* Fix unit tests

* Fix typos and small adjusts

---------

Co-authored-by: Daniel Augusto Veronezi Salvador <gutoveronezi@apache.org>
2024-02-09 09:35:34 +01:00
Rene Peinthor
56f0448f0d
Linstor fix migration while node offline (#8610)
* linstor: Add util method getBestErrorMessage from main

* linstor: failed remove of allow-two-primaries is no fatal error

* linstor: Fix failure if a Linstor node is down while migrating

If a Linstor node is down while migrating resource, allow-two-primaries
setting will fail because we can't reach the downed node. But it will
still set the property on the other nodes and migration should work.
We now just report an error instead of completely failing.
2024-02-08 23:57:38 +05:30
Leo
3fa052c1f5
Fix cloudstack-ui package: bad directory permissions and missing WEB-INF (#8568)
* Fix bad perms on sub directories for webapp asset files

Updated the spec file such that directories are chmod 0755 rather than 0644 which would prevent the cloud user from reading their contents.

* Fix bad permissions for centos8 UI files, missing WEB-INF

The cloudstack-ui package should have the same files as the bundled webapp in the management package.

* Fix bad perms and missing WEB-INF for centos7 ui rpm

Add the missing WEB-INF directory and do not set directories to 0755.

* Fix missing WEB-INF on CentOS 8 cloudstack-ui rpm

* Fix missing WEB-INF on CentOS 7 cloudstack-ui rpm
2024-02-08 23:15:20 +05:30