11653 Commits

Author SHA1 Message Date
Marcus Sorensen
155a30748c
Allow configkey to set 'cloud-name' cloud-init metadata (#7964)
* Allow configkey to set 'cloud-name' cloud-init metadata

* Update engine/api/src/main/java/com/cloud/vm/VirtualMachineManager.java

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>

* Update server/src/main/java/com/cloud/network/NetworkModelImpl.java

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>

* Update server/src/main/java/com/cloud/network/router/CommandSetupHelper.java

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>

* Revert "Update server/src/main/java/com/cloud/network/router/CommandSetupHelper.java"

This reverts commit 8abc3e38c4f973227e77253a8bcf3c94827d187f.

* Revert "Update server/src/main/java/com/cloud/network/NetworkModelImpl.java"

This reverts commit 7f239be919112913d764b141e943acca4473f755.

* Rework/Fix review code suggestions

---------

Co-authored-by: Marcus Sorensen <mls@apple.com>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
2023-09-26 14:51:11 +05:30
Rohit Yadav
30e34ef310 Merge remote-tracking branch 'origin/4.18' 2023-09-26 14:43:23 +05:30
Fabricio Duarte
ef742210b5
Fix 2FA becoming enabled when the user inputs the wrong code during setup (#7972) 2023-09-26 08:59:11 +02:00
Vishesh
b614a74027
Fixup CheckedReservationTest (#7997) 2023-09-25 20:20:45 +05:30
Vishesh
e721f3b379
Remove powermock from server (#7986) 2023-09-22 14:07:08 +02:00
Daan Hoogland
0375714ded Merge release branch 4.18 to main
* 4.18:
  ldap trust map cleanup on domain delete (#7915)
  upgrade: fix upgrade from 4.18.1.0 to 4.18.2.0-SNAPSHOT (#7959)
2023-09-19 11:20:58 +02:00
Stephan Krug
c428d3bb34
Add and improve logs in snapshot scheduling (#6925)
Co-authored-by: Stephan Krug <stephan.krug@scclouds.com.br>
2023-09-19 08:54:52 +02:00
dahn
09ae0499b2
ldap trust map cleanup on domain delete (#7915)
Co-authored-by: Wei Zhou <weizhou@apache.org>
2023-09-19 08:01:15 +02:00
Vishesh
d25521e96f
Fix issues in VM Scheduler (#7782) 2023-09-18 14:11:06 +02:00
John Bampton
4eb110af73
Remove unneeded duplicate words (#7850) 2023-09-18 13:16:33 +02:00
Wei Zhou
246bb24b0f Updating pom.xml version numbers for release 4.18.2.0-SNAPSHOT
Signed-off-by: Wei Zhou <weizhou@apache.org>
2023-09-12 17:26:53 +02:00
Nicolas Vazquez
940733cedf
UI: Fix user role login due to missing API access on custom hypervisor name (#7939)
* UI: Fix user role login due to missing API access on custom hypervisor name

* Refactor to include the custom HW display name as part of the response of listCapabilities API

* Add since parameter
2023-09-11 14:08:05 +05:30
Wei Zhou
f6b2a58727 Merge branch '4.18' 2023-09-07 08:56:35 +02:00
Wei Zhou
4bdff06acd Updating pom.xml version numbers for release 4.18.1.0
Signed-off-by: Wei Zhou <weizhou@apache.org>
2023-09-07 08:50:50 +02:00
Abhishek Kumar
f049f5409e
server: fix dualstack ipv6 networks for vxlan (#7933)
Fixes #7926

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-09-07 08:46:45 +02:00
GaOrtiga
819dd7b75c
server: remove supportedOwner from Resource.ResourceType (#7416) 2023-08-30 11:29:16 +02:00
Rohit Yadav
7362e5338c Merge remote-tracking branch 'origin/4.18' 2023-08-28 12:54:36 +05:30
Wei Zhou
26581b7741
server: throw new exception when rootdisksize is required but not set (#7913)
* server: throw new exception when rootdisksize is required but not set

* PR7913: fix an issue with PR6441
2023-08-28 08:57:40 +02:00
Wei Zhou
0dd6bb7c67
systemvm: update size and state of systemvm template during registration (#7874) 2023-08-25 16:46:32 +02:00
Daan Hoogland
24ae5aa5fa Merge branch '4.18' 2023-08-25 14:27:34 +02:00
Wei Zhou
b19db10ea6
server: try with all supported hypervisors (ordered, no duplications) when deploy a virtual router (#7877) 2023-08-25 11:49:03 +02:00
Wei Zhou
8dc5fdd067
server: fix cannot get systemvm ips in dedicated ranges (#7144)
This fixes #6698
2023-08-25 11:36:39 +02:00
Wei Zhou
f5a1f4130d
server: fix global setting system.vm.public.ip.reservation.mode.strictness is not really dynamic (#7909)
If the original value is `false`, and search build is configured without the condition. Now change the value to `true`, it will not get effective due to missing condition.
2023-08-25 11:35:31 +02:00
Wei Zhou
3b05797344 Merge remote-tracking branch 'origin/4.18' 2023-08-24 18:32:56 +02:00
Wei Zhou
3c38ed7a65
server: allow user to list available IPs on shared networks (#7898)
This fixes #7817
2023-08-24 21:42:01 +05:30
Marcus Sorensen
a0702279aa
server Don't allow inadvertent deletion of hidden details via API (#7880)
* Don't allow inadvertent deletion of hidden details via API

* Update VM details unit test ensuring system/hidden details not removed

* Update test/integration/component/test_update_vm.py

---------

Co-authored-by: Marcus Sorensen <mls@apple.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2023-08-24 10:45:39 +02:00
Daan Hoogland
27f148e79e Merge branch '4.18' 2023-08-23 11:15:56 +02:00
Wei Zhou
e4117e68d2
engine/schema: fix duplicated guest OSes in 4.18.0.0 (#7799)
Co-authored-by: Daan Hoogland <daan@onecht.net>
2023-08-23 09:44:34 +02:00
Daan Hoogland
2ef159eeb8 merge issues 2023-08-22 13:44:21 +02:00
Daan Hoogland
ea832bce13 Merge branch '4.18' 2023-08-22 11:44:45 +02:00
Wei Zhou
78bdde9e98
AutoScaling: support Managed User Data (#7769) 2023-08-22 11:07:16 +02:00
Fabricio Duarte
6d24217636
server: Allow admins to disable the 2FA of users in subdomains (#7870) 2023-08-21 15:48:33 +02:00
Sina Kashipazha
d296f54c7f
Api: update command domainId/account descriptions (#7876) 2023-08-20 15:44:31 +02:00
Sina Kashipazha
add64bd7e6
security group: replace vm.getPrivateMacAddress() with nic.getMacAddress() (#7293) 2023-08-18 10:49:16 +02:00
Wei Zhou
d8a5c89060
server: get only Ready ISO to mount (#7848) 2023-08-17 11:04:14 +02:00
Nicolas Vazquez
8b5ba13b81
plugins: Add Custom hypervisor minimal changes (#7692)
### Description

Design document: https://cwiki.apache.org/confluence/display/CLOUDSTACK/%5BDRAFT%5D+Minimal+changes+to+allow+new+dynamic+hypervisor+type%3A+Custom+Hypervisor

This PR introduces the minimal changes to add a new hypervisor type (internally named Custom in the codebase, and configurable display name), allowing to write an external hypervisor plugin as a Custom Hypervisor to CloudStack

The custom hypervisor name is set by the setting: 'hypervisor.custom.display.name'. The new hypervisor type does not affect the behaviour of any CloudStack operation, it simply introduces a new hypervisor type into the system.

CloudStack does not have any means to dynamically add new hypervisor types. The hypervisor types are internally preset by an enum defined within the CloudStack codebase and unless a new version supports a new hypervisor it is not possible to add a host of a hypervisor that is not in part of the enum. It is possible to implement minimal changes in CloudStack to support a new hypervisor plugin that may be developed privately

This PR is an initial work on allowing new dynamic hypervisor types (adds a new element to the HypervisorType enum, but allows variable display name for the hypervisor)

##### Proposed Future work:
Replace the HypervisorType from a fixed enum to an extensible registry mechanism, registered from the hypervisor plugin

#### Feature Specifications
- The new hypervisor type is internally named 'Custom' to the CloudStack services (management server and agent services, database records).
- A new global setting ‘hypervisor.custom.display.name’ allows administrators to set the display name of the hypervisor type. The display name will be shown in the CloudStack UI and API.
   - In case the ‘hypervisor.list’ setting contains the display name of the new hypervisor type, the setting value is automatically updated after the ‘hypervisor.custom.display.name’ setting is updated.
- The new Custom hypervisor type supports:
   - Direct downloads (the ability to download templates into primary storage from the hypervisor hosts without using secondary storage)
   - Local storage (use hypervisor hosts local storage as primary storage)
   - Template format: RAW format (the templates to be registered on the new hypervisor type must be in RAW format)
- The UI is also extended to display the new hypervisor type and the supported features listed above.
- The above are the minimal changes for CloudStack to support the new hypervisor type, which can be tested by integrating the plugin codebase with this feature.


#### Use cases
This PR allows the cloud administrators to test custom hypervisor plugins implementations in CloudStack and easily integrate it into CloudStack as a new hypervisor type ("Custom"), reducing the implementation to only the hypervisor supported specific storage/networking and the hypervisor resource to communicate with the management server.

- CloudStack admin should be able to create a zone for the new custom hypervisor and add clusters, hosts into the zone with normal operations
- CloudStack users should be able to execute normal VMs/volumes/network/storage operations on VMs/volumes running on the custom hypervisor hosts
2023-08-16 20:53:24 +05:30
Charles Queiroz
e8b491177f
server: Replace Hashtable with LinkedHashMap in createIsoResponse (#7844)
* Replace Hashtable with LinkedHashMap in createIsoResponse

This change replaces the use of Hashtable with LinkedHashMap in the `createIsoResponse` method of `ViewResponseHelper`.
 The reason for this modification is to maintain the insertion order of entries, which isn't the case with Hashtable.
  This could lead to more predictable results and behaviors in calling methods.

* Replace Hashtable with LinkedHashMap in view response creation methods

Changed Hashtable to LinkedHashMap in various response creation methods within ViewResponseHelper class.
This modification ensures an ordered iteration which is beneficial for scenarios where the insertion order of responses needs to be maintained consistently.

---------

Co-authored-by: Sina Kashipazha <soreana@users.noreply.github.com>
2023-08-16 08:58:41 +02:00
dahn
19aacad46b
UI: Show iso urls (#7869)
* add url to details

* some cleanup
2023-08-15 13:51:53 +02:00
Daan Hoogland
5559668f12 Merge branch '4.18' 2023-08-15 09:15:17 +02:00
Fabricio Duarte
72e3491cef
server: Fix allocation of more public IPs than the account's limit (#7832) 2023-08-14 10:33:29 +02:00
Daan Hoogland
7b64236469 Merge release branch 4.18 to main
* 4.18:
  server: remove registered userdata when cleanup an account (#7777)
  server: Use max secondary storage defined on the account during upload  (#7441)
  test: upgrade kubernetes versions to 1.25.0/1.26.0 (#7685)
  kvm: Added VNI Devices as normal bridge slave devs (#7836)
  noVNC: fix JP keyboard on vmware7+ which uses websocket URL (#7694)
2023-08-10 14:50:46 +02:00
Wei Zhou
1605b2f0db
server: remove registered userdata when cleanup an account (#7777) 2023-08-10 14:33:59 +02:00
João Jandre
fdb23dae40
server: Use max secondary storage defined on the account during upload (#7441) 2023-08-10 11:39:40 +02:00
Wei Zhou
a1af03f413
noVNC: fix JP keyboard on vmware7+ which uses websocket URL (#7694)
* noVNC: fix JP keyboard on vmware7+ which uses websocket URL

* noVNC: cleanup rfb.js

* noVNC: fix < and > on JP keyboard

* noVNC: fix Caps lock on JP keyboard
2023-08-09 11:43:16 +02:00
Daan Hoogland
32448e1ac7 Merge branch '4.18' 2023-08-07 11:13:17 +02:00
dahn
dea1373480
server: clean network offerings for domain on remove (#7775) 2023-08-07 09:56:58 +02:00
mprokopchuk
ab0297ea9b
VM.CREATE/VOLUME.DELETE/VOLUME.DESTROY not being emitted (#7760)
VM.CREATE/VOLUME.DELETE/VOLUME.DESTROY not being emitted

* Update server/src/main/java/com/cloud/vm/UserVmManagerImpl.java

Co-authored-by: dahn <daan.hoogland@gmail.com>

* Update api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java

Co-authored-by: dahn <daan.hoogland@gmail.com>

---------

Co-authored-by: Maxim Prokopchuk <mprokopchuk@apple.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2023-08-07 10:18:17 +05:30
Daan Hoogland
e3bd2c0a8c Merge branch '4.18' 2023-08-04 09:24:16 +02:00
dahn
b4032d9984
include all VMs when projects selected not just for admins (#7667) 2023-08-03 16:06:11 +02:00
John Bampton
6f4503488b
pre-commit: apply end-of-file-fixer to all files (#7551) 2023-08-02 13:47:21 +02:00