Compare commits

...

795 Commits

Author SHA1 Message Date
Fabricio Duarte 5893ba5a8c
server: Fix NPE when on findHostsForMigration when no suitable hosts are found (#13138) 2026-05-12 09:07:20 +02:00
Abhishek Kumar e1521f139b
systemvmtemplate-register: correctly update existing template name in config (#12703) 2026-05-11 13:22:54 +02:00
Suresh Kumar Anaparti a4a52c9665
Merge branch '4.22' 2026-05-08 20:57:36 +05:30
Suresh Kumar Anaparti 4359198904
KVM Host HA improvements - Fix to not cancel VM HA items when Host HA inspection in progress, and some code improvements (#13088)
* Host HA code improvements

* Fix to not cancel VM HA items when Host HA is enabled & inspection in progress, and some code improvements

- When Host HA inspection in progress, the investigor returns the Host Status as Up which cancels the VM HA items
- Don't cancel the VM HA items, instead reschedule them to try again later

* Changes to consider Recovered/Available Host HA state along with the agent connection status to determine the Host HA inspection in progress or not, and some code improvements
2026-05-08 19:50:50 +05:30
Suresh Kumar Anaparti ddcc0c889d
Don't delete volume on store if it is not created or doesn't exist on it (#13111) 2026-05-08 12:20:06 +05:30
Manoj Kumar 72b99a3f8c
Make resource deletion safer with name confirmation (#13104)
* enable double confirmation in delete flow for resource

* address copilot comments
2026-05-08 10:56:50 +05:30
Manoj Kumar 4425ee4234
Remove unnecessary if-else branch in template permission validation (#12683)
* consolidate if-else branch
2026-05-07 21:37:31 -03:00
dahn f6efda50d2
Update .asf.yaml: Add ingox as collaborator(#12058) 2026-05-07 17:11:54 +02:00
dependabot[bot] cbc1ae7388
Bump the github-actions-dependencies group across 1 directory with 9 updates (#13042)
Bumps the github-actions-dependencies group with 9 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [codecov/codecov-action](https://github.com/codecov/codecov-action) | `4` | `6` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3` | `4` |
| [github/gh-aw](https://github.com/github/gh-aw) | `0.45.0` | `0.71.1` |
| [actions/github-script](https://github.com/actions/github-script) | `8.0.0` | `9.0.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `6.0.0` | `7.0.1` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `6.0.0` | `8.0.1` |
| [docker/login-action](https://github.com/docker/login-action) | `2` | `4` |
| [eps1lon/actions-label-merge-conflict](https://github.com/eps1lon/actions-label-merge-conflict) | `2.0.0` | `3.0.3` |
| [actions/setup-node](https://github.com/actions/setup-node) | `5` | `6` |



Updates `codecov/codecov-action` from 4 to 6
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v6)

Updates `github/codeql-action` from 3 to 4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

Updates `github/gh-aw` from 0.45.0 to 0.71.1
- [Release notes](https://github.com/github/gh-aw/releases)
- [Changelog](https://github.com/github/gh-aw/blob/main/CHANGELOG.md)
- [Commits](58d1d157fb...f01a9d118a)

Updates `actions/github-script` from 8.0.0 to 9.0.0
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](ed597411d8...3a2844b7e9)

Updates `actions/upload-artifact` from 6.0.0 to 7.0.1
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](b7c566a772...043fb46d1a)

Updates `actions/download-artifact` from 6.0.0 to 8.0.1
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](018cc2cf5b...3e5f45b2cf)

Updates `docker/login-action` from 2 to 4
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v4)

Updates `eps1lon/actions-label-merge-conflict` from 2.0.0 to 3.0.3
- [Release notes](https://github.com/eps1lon/actions-label-merge-conflict/releases)
- [Changelog](https://github.com/eps1lon/actions-label-merge-conflict/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eps1lon/actions-label-merge-conflict/compare/v2.0.0...v3.0.3)

Updates `actions/setup-node` from 5 to 6
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: codecov/codecov-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: eps1lon/actions-label-merge-conflict
  dependency-version: 3.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: github/codeql-action
  dependency-version: 4.35.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: github/gh-aw
  dependency-version: 0.68.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 10:06:32 -03:00
Bernardo De Marco Gonçalves 96ca1b2a7c
Add option to control MAC address reuse for VR public NICs (#13001) 2026-05-06 13:41:11 -03:00
Daan Hoogland 3e688b0197 Merge tag '4.22.0.1' into 4.22 2026-05-06 11:13:45 +02:00
Rene Peinthor 5b9a3d7d32
linstor: Fix a file handle resource leak opening template.properties (#13091) 2026-05-04 14:43:06 +05:30
Suresh Kumar Anaparti 519715e81a
Fix id in listguestosmapping search (#13082) 2026-05-04 14:41:35 +05:30
codingkiddo 1e512ab9c6
Skip QemuImgTest when libvirt native library cannot load (#13086)
Co-authored-by: Vinod Kumar <vinodkumar@192.168.1.3>
2026-05-03 18:45:54 +02:00
Abhishek Kumar a17bff9ba8
ui: fix webhook filters listing (#13068) 2026-05-03 18:39:41 +02:00
Suresh Kumar Anaparti 8906aa1d46
Merge branch '4.22' 2026-05-01 22:51:01 +05:30
Henrique Sato c07f1fd5d2
Number of running and stopped VMs as preset variables for `Network` type Quota tariffs (#11689)
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2026-05-01 11:54:40 +02:00
Fabricio Duarte 1f5dba9bd2
Release reserved storage resources on VM deployment failure (#13048) 2026-04-30 20:52:35 +05:30
Bryan Lima c45596cca3
Refactor of Allocator classes (#9074)
* Refactoring Allocator classes

* Break into smaller methods random and firfit allocators.

* Added unit tests for random and firstfit allocators

* Move random allocator from cloud-plugins to cloud-server

* Add BaseAllocator abstract class for duplicate code

* Add missing license

* Add missing license to unit test file

* Remove host allocator random dependency

* Change exception message on smoke tests

* Remove conditional as it was never actually reached in the original flow

* Fix tests

* Fix flipped parameters

* Fix NPE while listing hosts for migration when suitableHosts is null

* Remove unnecessary stubbings

* Fix checkstyle

* Remove unnecessary file

* Rename exception error messages

* Apply suggestions from code review

Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

* Rename UserVmDetailVO references to VMInstanceDetailVO

* Remove unused imports

* Add new line at EOF

* Remove unnecessary random allocator pom

* Fix GPU allocation mistake

* Fix failing tests

---------

Co-authored-by: Fabricio Duarte <fabricio.duarte@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2026-04-30 10:30:02 -03:00
Abhishek Kumar 2eef7aa9a2 adding default deny keys also when there are no other keys 2026-04-30 13:52:39 +02:00
Gean Jair Silva 92d82989e3
Correction of the user responsible for the event (#13066)
Co-authored-by: gean.silva <gean.silva@scclouds.com.br>
2026-04-30 14:16:26 +05:30
julien-vaz a73cc9a22c
Improve Quota Statement (#10506)
* Improve Quota Statement

* Removes unused import

* Fix QuotaUsageJoinDao, QuotaResponseBuilderImpl, QuotaServiceImpl e QuotaServiceImplTest

* Reorganize imports

* Updates QuotaStatementCmd responseBuilder scope to default

* Fix log4j syntax

* Address reviews + other improvements

* Add missing SQL scripts and injections

* Change accountid and domainid logic + add unit tests

* Rename QuotaUsageDetail to QuotaTariffUsage

* Fix out of bounds exception

---------

Co-authored-by: Julien Hervot de Mattos Vaz <julien.vaz@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2026-04-29 21:09:13 -03:00
Sergiy Kukunin 089eb36e47
Linstor: fix create volume from snapshot on primary storage (#13043)
* Linstor: fix create volume from snapshot on primary storage

When creating a volume from a snapshot on Linstor primary storage
(with lin.backup.snapshots=false), the operation fails with:
"Only the following image types are currently supported: VHD, OVA,
QCOW2, RAW (for PowerFlex and FiberChannel)"

Root cause: the Linstor driver does not handle SNAPSHOT -> VOLUME in
its canCopy()/copyAsync() methods. This causes DataMotionServiceImpl
to fall through to StorageSystemDataMotionStrategy (selected because
Linstor advertises STORAGE_SYSTEM_SNAPSHOT=true). That strategy's
verifyFormatWithPoolType() rejects RAW format for Linstor pools,
since RAW is only allowed for PowerFlex and FiberChannel.

Additionally, VolumeOrchestrator.createVolumeFromSnapshot() attempts
to back up the snapshot to secondary storage when the storage plugin
does not advertise CAN_CREATE_TEMPLATE_FROM_SNAPSHOT. This backup
fails because the snapshot only exists on Linstor primary storage.

Fix:
- Add CAN_CREATE_TEMPLATE_FROM_SNAPSHOT capability so the
  orchestrator skips the backup-to-secondary path
- Add canCopySnapshotToVolumeCond() to match SNAPSHOT -> VOLUME
  when both are on the same Linstor primary store
- Wire it into canCopy() to intercept at DataMotionServiceImpl
  before strategy selection, bypassing StorageSystemDataMotionStrategy
- Implement copySnapshotToVolume() which delegates to the existing
  createResourceFromSnapshot() for native Linstor snapshot restore

This follows the same pattern used by the StorPool plugin, which
handles SNAPSHOT -> VOLUME directly in its driver rather than going
through StorageSystemDataMotionStrategy.

Tested on CloudStack 4.22 with Linstor LVM_THIN storage, creating
a volume from a 1TB CNPG Postgres database snapshot. Volume creates
successfully with correct path and deletes cleanly.

* Let CloudRuntimeException propagate from copySnapshotToVolume

Remove try/catch in copySnapshotToVolume so that CloudRuntimeException
from createResourceFromSnapshot propagates to the caller, ensuring
CloudStack properly notices and reports the failure.

* Fix CAN_CREATE_TEMPLATE_FROM_SNAPSHOT breaking template creation

Setting CAN_CREATE_TEMPLATE_FROM_SNAPSHOT unconditionally to true
caused createTemplate from snapshot to take the StorPool-specific
code path in TemplateManagerImpl, which sends a CopyCommand to a
system VM that Linstor cannot handle.

Fix: make CAN_CREATE_TEMPLATE_FROM_SNAPSHOT conditional on the same
flag as STORAGE_SYSTEM_SNAPSHOT (!BackupSnapshots). When snapshots
are backed up to secondary (the default), the old template creation
flow works. When snapshots stay on primary, the direct path is used.

Also fix checkstyle: remove unused DataObject import in test.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-29 11:23:08 +05:30
Erik Böck e2c13da419
Remove UUID parse from param processing workflow (#13065) 2026-04-28 09:13:05 +02:00
Henrique Sato 6f4445c5c1
Add offering preset variables for `Network` and `VPC` Quota tariffs (#11810)
* Add offering preset variable to Network and VPC tariffs

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

* Add tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2026-04-27 09:36:37 -03:00
Suresh Kumar Anaparti ffebe8eaa6
Fix bulk power state query missing VM lifecycle state field (#13027)
* Fix bulk power state query missing VM lifecycle state field

The IdsPowerStateSelectSearch partial select did not include the VM
lifecycle state, causing isPowerStateInSyncWithInstanceState to always
return true when state was null. This prevented retry of failed
StopCommands on subsequent ping cycles.

* Add defensive check for instance host ID to prevent NPE

Co-authored-by: Sachin R Doddaguni <s_rudrappadoddagu@apple.com>
Co-authored-by: nvazquez <nicovazquez90@gmail.com>
2026-04-27 15:38:52 +05:30
dahn 0b169920f3
make dh group 31 default, support 22-24+31 (#12764) 2026-04-27 13:43:58 +05:30
Suresh Kumar Anaparti 856d83a15e
Merge branch '4.22' 2026-04-23 23:53:24 +05:30
dahn 64ac0822b4
merge conflict fixes (#13046)
* merge conflict fixes

* fix pre-commit issue

Co-authored-by: Daan Hoogland <dahn@apache.org>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-04-23 23:46:54 +05:30
Abhisar Sinha a127a26ebd Fix Revert Instance to Snapshot with custom service offering (#12885)
* Fix revertVM with custom svc offering
2026-04-20 08:37:53 +02:00
Fabricio Duarte 89d915493f Fix NPE on external/unmanaged instance import using custom offerings (#12884)
* Fix NPE on external/unmanaged instance import using custom offerings
2026-04-20 08:37:21 +02:00
Nicolas Vazquez be89e6f7c3
[KVM] Reorder migration logs to prevent populating agent logs on migrations (#12883)
* Move logs for values of the migration settings out of the loop

* Apply suggestions from code review

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

---------

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-04-17 23:39:19 -03:00
Henrique Sato 3166e64891
Add support for new variables to the GUI whitelabel runtime system (#12760)
* Add support for new variables to the GUI whitelabel runtime system

* Address review
2026-04-17 10:59:50 -03:00
Wei Zhou f820d0125d
fix end of files and codespell errors 2026-04-17 13:58:21 +02:00
Wei Zhou 6c1437b7dd
fix end of file schema-42200to42210.sql 2026-04-17 13:56:17 +02:00
Daniil Zhyliaiev 4df32ae79f
fix: NsxResource.executeRequest DeleteNsxNatRuleCommand comparison bug (#12833)
Fixes an issue in NsxResource.executeRequest where Network.Service
comparison failed when DeleteNsxNatRuleCommand was executed in a
different process. Due to serialization/deserialization, the
deserialized Network.Service instance was not equal to the static
instances Network.Service.StaticNat and Network.Service.PortForwarding,
causing the comparison to always return false.

Co-authored-by: Andrey Volchkov <avolchkov@playtika.com>
(cherry picked from commit 30dd234b00)
2026-04-17 04:53:36 +05:30
Suresh Kumar Anaparti 2d6280b9da
Merge branch '4.22' 2026-04-17 04:35:25 +05:30
Suresh Kumar Anaparti 13a2c7793c
Merge branch '4.20' into 4.22 2026-04-17 03:12:33 +05:30
Brad House - Nexthop 83f705ddc5
Static Routes with nexthop non-functional for private gateways (#12859)
* Fix static routes to be added to PBR tables in VPC routers

Static routes were only being added to the main routing table, but
policy-based routing (PBR) is active on VPC routers. This caused
traffic coming in from specific interfaces to not find the static
routes, as they use interface-specific routing tables (Table_ethX).

This fix:
- Adds a helper method to find which interface a gateway belongs to
  by matching the gateway IP against configured interface subnets
- Modifies route add/delete operations to update both the main table
  and the appropriate interface-specific PBR table
- Uses existing CsAddress databag metadata to avoid OS queries
- Handles both add and revoke operations for proper cleanup
- Adds comprehensive logging for troubleshooting

Fixes #12857

* Add iptables FORWARD rules for nexthop-based static routes

When static routes use nexthop (gateway) instead of referencing a
private gateway's public IP, the iptables FORWARD rules were not
being generated. This caused traffic to be dropped by ACLs.

This fix:
- Adds a shared helper CsHelper.find_device_for_gateway() to determine
  which interface a gateway belongs to by checking subnet membership
- Updates CsStaticRoutes to use the shared helper instead of duplicating
  the device-finding logic
- Modifies CsAddress firewall rule generation to handle both old-style
  (ip_address-based) and new-style (nexthop-based) static routes
- Generates the required FORWARD and PREROUTING rules for nexthop routes:
  * -A PREROUTING -s <network> ! -d <interface_ip>/32 -i <dev> -j ACL_OUTBOUND_<dev>
  * -A FORWARD -d <network> -o <dev> -j ACL_INBOUND_<dev>
  * -A FORWARD -d <network> -o <dev> -m state --state RELATED,ESTABLISHED -j ACCEPT

Fixes the second part of #12857

* network matching grep fix, don't let 1.2.3.4/32 match 11.2.3.4/32
2026-04-16 16:15:43 +05:30
Brad House 6e810989b6
HAProxy Configuration: network.loadbalancer.haproxy.idle.timeout (#12586)
* initial attempt at network.loadbalancer.haproxy.idle.timeout implementation

* implement test cases

* move idleTimeout configuration test to its own test case
2026-04-16 14:49:54 +05:30
Daniil Zhyliaiev e0fe953791
fix: NSX SDK list operations are pageable: the API returns a non-null and non-empty (#12834)
`cursor` field when more pages are available. The previous implementation only
fetched the first page and ignored pagination.

This change updates the list retrieval flow to:
- follow the `cursor` chain until no further pages exist
- accumulate items from all pages
- return a single merged result to the caller

This ensures that list operations return the complete dataset rather than just
the first page.

Co-authored-by: Andrey Volchkov <avolchkov@playtika.com>
2026-04-16 14:15:30 +05:30
Daniil Zhyliaiev 05c59630e0
fix: LB Creation avoid 404 API errors due to non-needed patches (#12835) 2026-04-16 13:58:20 +05:30
Wei Zhou 1fc4cb90bf
Routed VR: accept packets from related and established connections (#12986) 2026-04-15 15:36:26 +05:30
Abhishek Kumar c6936889f5
server: prevent adding vm compute details when not applicable (#12637) 2026-04-15 10:41:20 +02:00
Daan Hoogland f5e75771bc merge forwards fix 2026-04-15 09:58:27 +02:00
Daan Hoogland c298f8f360 Merge release branch 4.22.0.1 to 4.22
* tag '4.22.0.1':
  Implement limit validations on updateBucket
  Address reviews
2026-04-15 08:58:24 +02:00
Fabricio Duarte 2511fdffaa Implement limit validations on updateBucket 2026-04-15 08:53:37 +02:00
Fabricio Duarte 13842a626d Address reviews 2026-04-15 08:52:35 +02:00
Nicolas Vazquez 160876c6d7
Fix: API Thread held forever during force deleting across MS (#12968) 2026-04-15 08:41:26 +02:00
Erik Böck 5013cf2af6
Fix user password reset mail template value (#12882)
* Fix default user password reset email template

* improve readabilty

* change update query

* Specify database for update

* Fix SQL statement

* Use CONCAT_WS sql method to create multiline string

---------

Co-authored-by: GaOrtiga <49285692+GaOrtiga@users.noreply.github.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-04-15 10:06:39 +05:30
Harikrishna 0c86899cc1
Added VDDK support in VMware to KVM migrations (#12970) 2026-04-14 22:33:01 +05:30
Daan Hoogland 82bfa9fb3f Merge branch '4.22' 2026-04-14 14:50:44 +02:00
Daan Hoogland 23f633ae83 Merge tag '4.22.0.1' into 4.22 2026-04-14 13:15:14 +02:00
Daan Hoogland 1085da4ef8 Merge commit '19b4ef106931aa1d6a8fed06984009d86760e4de' into 4.22 2026-04-14 13:15:05 +02:00
Suresh Kumar Anaparti d75acb6efc
Fix rollback disk snapshots on instance snapshot failure (#12949) 2026-04-14 15:21:05 +05:30
Suresh Kumar Anaparti 38abe2df0b
Allow list async jobs by resource type alone (#13011) 2026-04-14 15:20:13 +05:30
Suresh Kumar Anaparti feb6076930
Remove unused config consoleproxy.cmd.port (#12807)
* Remove unused config 'consoleproxy.cmd.port'

* Remove the config key

---------

Co-authored-by: dahn <daan@onecht.net>
2026-04-14 13:40:00 +05:30
julien-vaz 161b4177c2
Add logs for storage pools reordering (#10419)
Co-authored-by: Julien Hervot de Mattos Vaz <julien.vaz@scclouds.com.br>
2026-04-14 09:51:05 +02:00
Henrique Sato ed575cc0a1
New config.json variable to set the ACS default language (#12863)
* New config.json variable to set the ACS default language

* Address review
2026-04-13 14:37:45 -03:00
Jtolelo ae455ee193 VPC restart cleanup for Public networks with multi-CIDR data (#12622)
* Fix VPC restart with multi-CIDR networks: handle comma-separated CIDR in NetworkVO.equals()

When a network has multiple CIDRs (e.g. '192.168.2.0/24,160.0.0.0/24'),
NetworkVO.equals() passes the raw comma-separated string to
NetUtils.isNetworkAWithinNetworkB() which expects a single CIDR,
causing 'cidr is not formatted correctly' error during VPC restart
with cleanup=true.

Extract only the first CIDR value before passing to NetUtils.

* Fix root cause: skip CIDR/gateway updates for Public traffic type networks

addCidrAndGatewayForIpv4/Ipv6 (introduced by PR #11249) was called for all
network types without checking if the network is Public. This caused
comma-separated CIDRs to be stored on Public networks, which then triggered
'cidr is not formatted correctly' errors during VPC restart.

Add TrafficType.Public guard in both the VLAN creation (addCidr) and
VLAN deletion (removeCidr) paths in ConfigurationManagerImpl.

* Sanitize legacy network-level addressing fields for Public networks

---------

Co-authored-by: dahn <daan@onecht.net>
2026-04-13 15:40:26 +02:00
Suresh Kumar Anaparti 47c5bb8ee7 Support list/query async jobs by resource (#12983)
* Add resource filtering to async job query commands

* Fix logical condition in AsyncJobDaoImpl and ResourceIdSupport

* resource type case-insensitive validation

* fix resource type and id search

---------

Co-authored-by: mprokopchuk <mprokopchuk@gmail.com>
Co-authored-by: mprokopchuk <mprokopchuk@apple.com>
2026-04-13 15:39:49 +02:00
sandeeplocharla 5b696c0ec7
Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage (#12563)
* Create & Delete, Enable & Disable, Enter & Cancel maintenance of Primary StoragePool with ONTAP storage
Co-authored-by: Rajiv Jain <Rajiv.Jain@netapp.com>

Create & Delete, Enable & Disable, Enter & Cancel maintenance of Primary StoragePool with ONTAP storage
Co-authored-by: Rajiv Jain<rajiv1@netapp.com>

Edited readme file

Fixed license check issue

Removed dependency that's not conforming with ACF guidelines

* Fixed the initial review comments

* Fixed some rebase issues

---------

Co-authored-by: Locharla, Sandeep <Sandeep.Locharla@netapp.com>
2026-04-13 08:38:15 -03:00
Abhisar Sinha 8eb162cb99 Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
Daan Hoogland d6f4fc3ac4 Updating pom.xml version numbers for release 22.0.1 2026-04-13 11:53:00 +02:00
Abhishek Kumar 19b4ef1069 server: reserve backup, bucket resource limits during operations
Changes to check resource limits with reservations for the following
resource types:
- backup
- backup_storage
- bnucket
- object_storage

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-04-13 11:21:41 +02:00
Fabricio Duarte 9f57a4dd19
Unhide setting `js.interpretation.enabled` (#12605)
* Unhide setting 'js.interpretation.enabled'

* Fix grammar mistake
2026-04-10 23:45:07 -03:00
João Jandre 7c7b2ae75d
Fix KVM incremental volume snapshot creation (#12666) 2026-04-11 00:12:44 +05:30
Manoj Kumar b196e97cc3
Prevent deletion of account and domain if either of them has deleted protected instance (#12901) 2026-04-10 15:51:22 +02:00
Abhisar Sinha df7ff97271
Create volume on a specified storage pool (#12966) 2026-04-10 14:27:39 +02:00
Wei Zhou 273699cf56
kvm: fix wrong CheckVirtualMachineAnswer when vm does not exist (#12928)
* kvm: fix wrong CheckVirtualMachineAnswer when vm does not exist

* kvm: add LibvirtCheckVirtualMachineCommandWrapperTest

Co-authored-by: dahn <daan.hoogland@gmail.com>
2026-04-10 16:01:29 +05:30
poddm 8f3c6fad7a
set snapcpg config on copy (#12955) 2026-04-10 15:18:45 +05:30
Bernardo De Marco Gonçalves 27e4d979f1
Clean up backup references to their schedules when the schedules are deleted (#12401)
* clean up backup schedule references after their deletion

* drop unused column

* address reviews
2026-04-10 14:51:52 +05:30
Vishesh 80ee7f183f
Fix six package incompatiblity with EL10 (#12799) 2026-04-10 14:47:49 +05:30
Wei Zhou e297644ce1
KVM: Enable HA heartbeat on ShareMountPoint (#12773) 2026-04-10 14:12:40 +05:30
Suresh Kumar Anaparti 11538df710
Merge branch '4.22' 2026-04-10 12:02:40 +05:30
João Jandre 2a60305792
Fix snapshot chaining on Xen (#12597) 2026-04-10 11:05:26 +05:30
Suresh Kumar Anaparti 7b467496cb
Do not include snapshots with Group type in snapshots resource count (#12945) 2026-04-10 10:50:35 +05:30
Abhisar Sinha 68bd056306
Support timeout configuration for Create and Restore NAS backup (#12964)
* Introduce configurable timeout to Create NAS backup

* use timeout set via "commands.timeout"
2026-04-10 10:11:54 +05:30
Abhisar Sinha 4ba4bd33c3
replace GROUP_CONCAT with JSON_ARRAYAGG to avoid errors like Row 19 was cut by GROUP_CONCAT (#12777) 2026-04-10 09:39:03 +05:30
Vishesh 416679fae1
Fix domain parsing for GPU & add Display controller in the supported PCI class (#12981)
* Fix domain parsing for GPU

* Add Display controller to GPU class check
this adds support for the amd instinct mi2xx accelorator crards in the discovery script.

Co-authored-by: Piet Braat <piet@phiea.nl>
2026-04-10 09:23:07 +05:30
prashanthr2 b1bc5380a2
fix: support SharedMountPoint for KVM volume import and unmanage (#12956) 2026-04-09 15:09:08 +02:00
prashanthr2 b0b3dc91f5
fix: support SharedMountPoint volume checks for importVm (#12946) 2026-04-09 13:34:35 +02:00
Nicolas Vazquez b5858029bb
Fix listing service offerings with different host tags (#12919) 2026-04-09 10:55:47 +02:00
Manoj Kumar 1ff9eec997
Load arch data for backup from template during create instance from backup (#12801) 2026-04-09 09:49:49 +02:00
Daman Arora 7ba5240b31
Block backup deletion while create-VM-from-backup or restore jobs are in progress (#12792)
* Block backup deletion while create-VM-from-backup or restore jobs are in progress

* Add tests

* Fix exception message

* Update test

Co-authored-by: Abhisar Sinha <63767682+abh1sar@users.noreply.github.com>
2026-04-09 11:09:01 +05:30
Suresh Kumar Anaparti c3614098da
Merge branch '4.22' 2026-04-08 18:09:43 +05:30
Abhisar Sinha 03de62bf38
Support Linstor Primary Storage for NAS BnR (#12796) 2026-04-08 15:14:20 +05:30
Suresh Kumar Anaparti abdf926219
Revert "Use lateral join (introduced in MySQL 8.0.14) with subquery on user_statistics table in account_view for netstats (#12631)" (#12965)
This reverts commit 58916eb608.
2026-04-08 09:43:44 +05:30
Daniil Zhyliaiev 30dd234b00
fix: NsxResource.executeRequest DeleteNsxNatRuleCommand comparison bug (#12833)
Fixes an issue in NsxResource.executeRequest where Network.Service
comparison failed when DeleteNsxNatRuleCommand was executed in a
different process. Due to serialization/deserialization, the
deserialized Network.Service instance was not equal to the static
instances Network.Service.StaticNat and Network.Service.PortForwarding,
causing the comparison to always return false.

Co-authored-by: Andrey Volchkov <avolchkov@playtika.com>
2026-04-06 15:50:17 -03:00
Suresh Kumar Anaparti e2d18c0748
Merge branch '4.22' 2026-04-02 10:30:18 +05:30
Wei Zhou 470812100e
server: set template type to ROUTING or USER if template type is not specified when upload a template (#12768) 2026-04-02 09:34:28 +05:30
Suresh Kumar Anaparti e10c066cc1
Fix NPE during VM setup for pvlan (#12781)
* Fix NPE during VM setup for pvlan

* review comments
2026-04-01 16:29:44 +02:00
Pearl Dsilva b805766f4b
Fix Host setup when persistent networks exist (#12751) 2026-04-01 07:25:19 -04:00
julien-vaz 4f93ba888c
Refactor Quota Summary API (#10505)
* Refactor Quota Summary API

* Fixes imports

* Fix QuotaServiceImplTest

* Update plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaSummaryCmd.java

Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

* Fix QuotaSummaryCmd

* Remove unnecessary imports

* Remove unused createQuotaSummaryResponse declarations

* Remove unnecessary imports

* Update plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaSummaryCmd.java

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

* Fix QuotaSummaryCmd

* Fix QuotaResponseBuilderImplTest

* Refactor test

* Fix QuotaSummaryCmd

* Fix projectid behavior

* Simplify QuotaSummary and deprecate listall

* Fix createQuotaSummaryResponse

* Remove unused import

* Apply suggestions + some adjustments

* Remove duplicated check

* Fix checkstyle

* Adjust entity owner

* Remove unused method + fix tests

* Add missing @ACL to some parameters

* Adjust how the parameters behave

* Allow domain admins and users to use keyword

* Address reviews

---------

Co-authored-by: Julien Hervot de Mattos Vaz <julien.vaz@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2026-03-31 20:29:30 -03:00
John Bampton 5d61ba3538
[CI] Create `.codespellrc`; upgrade codespell hook; fix typos (#12824) 2026-03-31 15:04:05 +02:00
John Bampton 5d95bdd0eb
pre-commit trailing whitespace auto clean up (#12841) 2026-03-31 15:02:39 +02:00
Henrique Sato 7eea9ed448
Add API to enable/disable NICs for KVM (#12819) 2026-03-31 10:14:20 +02:00
Pearl Dsilva 18075ae4a9
Add support for Headlamp dashboard for kubernetes; deprecate legacy kubernetes dashboard (#12776) 2026-03-30 16:04:45 +02:00
John Bampton cf9bda2050
[CI] Add github-actions ecosystem to Dependabot (#12823) 2026-03-30 15:49:22 +02:00
John Bampton 6bcbb008b4
Bump `actions/checkout` to `v6` (#12164) 2026-03-30 15:48:47 +02:00
Suresh Kumar Anaparti 59b6c32b60
[UI] Fix create backup notification (#12903) 2026-03-30 12:19:35 +02:00
Manoj Kumar 4ebe3349b7
add user-agent header to template downloader request (#12791) 2026-03-30 12:02:12 +02:00
Suresh Kumar Anaparti 71bd26ff7c
PowerFlex/ScaleIO storage - the MDMs validation improvements (#12893) 2026-03-27 15:37:30 -03:00
Suresh Kumar Anaparti 68030df10b
VM start error handling improvements and config to expose error to users (#12894)
* VM start error handling improvements, and config to expose error to user

* refactor
2026-03-27 15:35:08 -03:00
James Peru Mmbono 6ca6aa1c3f
Fix NPE in NASBackupProvider when no running KVM host is available (#12805)
* Fix NPE in NASBackupProvider when no running KVM host is available

ResourceManager.findOneRandomRunningHostByHypervisor() can return null
when no KVM host in the zone has status=Up (e.g. during management
server startup, brief agent disconnections, or host state transitions).

NASBackupProvider.syncBackupStorageStats() and deleteBackup() call
host.getId() without a null check, causing a NullPointerException that
crashes the entire BackupSyncTask background job every sync interval.

This adds null checks in both methods:
- syncBackupStorageStats: log a warning and return early
- deleteBackup: throw CloudRuntimeException with a descriptive message
2026-03-27 21:32:13 +05:30
owsferraro 131ea9f7ac
Fix PowerFlex 4.x issues with take & revert instance snapshots (#12880)
* fixed database update on snapshot with multiple volumes and an api change

* changed overwritevolumecontent based on powerflex version and removed unnecessary comments

* Update plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClientImpl.java

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Update plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClientImpl.java

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Update plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClientImpl.java

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

---------

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-03-27 07:22:08 -03:00
Suresh Kumar Anaparti 1bff543e58
Merge branch '4.22' 2026-03-27 01:25:42 +05:30
Nicolas Vazquez c1af36f8fc
[4.22] Prevent unmanaging or reinstalling a VM if it is part of a CKS cluster (#12800) 2026-03-26 18:17:49 +05:30
Suresh Kumar Anaparti 84676afd5c
Check for null host before proceeding with VM volume operations in managed storage while restoring VM (#12879) 2026-03-26 07:58:52 -03:00
Suresh Kumar Anaparti d6c39772b2
Set management server id from cookies after saml login (#12858) 2026-03-25 20:52:44 +05:30
Suresh Kumar Anaparti 7c3637a2f5
Fix duplicate dummy templates, and update guest os for dummy template (#12780)
* Fix duplicate dummy template 'kvm-default-vm-import-dummy-template' entries

* Update guest os id of dummy template to 99 (Other Linux (64-bit)) from existing id: 1 (CentOS 4.5 (32-bit))

* update migration path to remove duplicate dummy templates
2026-03-24 18:01:26 +05:30
Nicolas Vazquez 7107d28db8
[VMware to KVM] Add guest OS for importing VM based on the source VM OS (#12802) 2026-03-24 15:06:38 +05:30
Suresh Kumar Anaparti bce55945ec
Mark VMs in error state when expunge fails during destroy operation (#12749)
* Mark VMs in error state when expunge fails during destroy operation

* fetch volume by external id (used by external plugins)

* review comments

* Update reorder hosts log to DEBUG, log line is too verbose to have on as INFO
2026-03-24 00:29:14 -03:00
Fabricio Duarte 8608b4edd0 Fix snapshot copy resource limit concurrency
Co-authored-by: Abhisar Sinha <63767682+abh1sar@users.noreply.github.com>
2026-03-18 01:52:36 -03:00
Fabricio Duarte f333134456 Address merge issues 2026-03-17 19:28:16 -03:00
Daniel Augusto Veronezi Salvador e8d57d1b0d Implement/fix limit validation for secondary storage 2026-03-17 18:56:28 +01:00
João Jandre 86c9f7bd94 Fix backup list 2026-03-17 17:14:38 +01:00
João Jandre 24fd440ee7 Fix create VM from backup 2026-03-17 17:14:26 +01:00
João Jandre 8ce1c9876e fix restore volume from backup and attach 2026-03-17 17:14:05 +01:00
Fabricio Duarte 9db630932e Address public IP limit validations 2026-03-17 16:45:33 +01:00
Fabricio Duarte c6b20b8cc7 Fix failing tests 2026-03-17 15:51:45 +01:00
Fabricio Duarte 88a12a801f Cleanup imported VM from disk on failure due to volume allocation + prevent duplicate volume and primary storage increment on import 2026-03-17 15:50:26 +01:00
Manoj Kumar e93ae1a4f4
New config key "allow.import.volume.with.backing.file" to skip volume backing (#12809)
* Added support for skipping volume backing when importing unmanaged volumes and VMs. This allows users to import volumes and VMs without creating a backing volume, which can be useful in certain scenarios where the backing volume is not needed or desired.

* cleanup conflicting key

* move configkey into VolumeImportUnmanageService

---------

Co-authored-by: rajujith <rajujith@gmail.com>
2026-03-17 11:34:34 -03:00
Fabricio Duarte 9c0c8da706 [22.0] Address limit checks for VM, CPU, memory, volume, and primary storage 2026-03-17 15:10:33 +01:00
dahn b744824f65
Add code owners for nsx network elements plugin (#12838) 2026-03-17 21:51:49 +10:00
Pearl Dsilva 3bd5410f9a
Add support to clone existing offerings and update them (#12357)
* Add support to clone existing offerings and update them

* add support for vpc & backup offerings to be cloned

* fix capability list and mapping of params

* Add support to clone network and vpc offering with the right parameters

* make fields non mandatory for clone offerings APIs

* Add UI support for cloning Compute and System Service offerings

* remove unnecessary changes

* fix license and pre-ccommit issues

* Add UI support to clone disk and network offering

* vpc & backup offering clone api

* add unit tests

* fix pre-commit checks

* increase test coverage

* combine add/clone disk/compute offering forms

* update license

* fix unit tests

* fix test failures

* fix test failure - unnecessary stubbings

* pre-commit check failure

* add recently added domain id for bkp offering to be inherited in clone operation

* extract common code wrt service capability in network & vpc offering in add/clone operations

* add some checks to prevent networkmode change when provider is nsx/netris from the source networkmode

* address copilot comments

* address comments

* combine check

* use appropriate zoneId during clone bkp offering

* add check

* fix issue with test

* remove unused imports

* prevent creating a bkp offering of a bkp repo that already exists

* extend clone disk and service offerings to domain admins
2026-03-17 12:01:43 +05:30
Nicolas Vazquez 93239e09f1
Add conserve mode for VPC offerings (#12487) 2026-03-16 09:39:42 +01:00
Nicolas Vazquez 09ee0927e9
[4.22] Prevent Load Balancer rule creation when adding a VM from a different network (#12785) 2026-03-16 09:36:52 +01:00
Nicolas Vazquez 7048944883
[Fix] VMware to KVM migration instances listing failure (#12766) 2026-03-13 11:12:38 -03:00
Daman Arora 8c579538f9
CKS: Allow affinity group selection during cluster creation (#12386)
Co-authored-by: Daman Arora <daman.arora@shapeblue.com>
2026-03-13 10:58:55 +01:00
Abhisar Sinha f7f0e75122 Fixed a merge issue in ImageStoreUploadMonitorImpl 2026-03-13 15:19:28 +05:30
Fabricio Duarte 07c3dc86b2 [22.0] Consider infinite resources when calculating secondary storage limit for upload operations 2026-03-13 10:37:04 +01:00
Abhisar Sinha d722415105 [22.0] secondary storage resource limit for upload 2026-03-13 10:15:55 +01:00
Abhisar Sinha 5d5ee7b689 volume download fix 2026-03-13 10:04:02 +01:00
abh1sar 4855d40e6e [22.0] secondary storage resource limit for download 2026-03-13 10:01:41 +01:00
Vishesh 3b42fbf3b2
Fixing CI failures (#12789)
* Fixing CI failures

* fixup: test_secondary_storage
2026-03-13 13:33:59 +05:30
Pearl Dsilva 27bce46a8e
Clear System VM IP from NICs for PublicNetworkGuru (#11992) 2026-03-12 13:18:03 +01:00
Wei Zhou 2359061f66
api: remove required flag of gatewayid in CreateStaticRouteCmd (#12786) 2026-03-12 13:42:09 +05:30
Abhishek Kumar 7f7d0b02e1
Remove unnecessary stubbings in ManagementServerMaintenanceManagerImplTest (#11914) (#12623) 2026-03-12 12:29:31 +05:30
Daman Arora 71daf84c9e
Show security group selection in Basic zone VM deployment and fix SG listing for cross-domain deployments (#12775) 2026-03-12 12:06:20 +05:30
Davi Torres faaf7669c5
Update isolation methods description for physical network (#12759) 2026-03-10 14:45:42 +01:00
dahn d8f748ad0e
Update .asf.yaml 2026-03-10 10:14:33 +01:00
Dheeraj Bansal 7aa0558c5b
ui: avoid 404 after deleting template zones (#12681) 2026-03-09 14:29:12 +01:00
Abhishek Kumar db83622956
ui: fix create network from global create menu (#12677)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-03-09 14:26:19 +01:00
Klaus de Freitas Dornsbach 74af9b9875
API key pair restructure (#9504)
Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
2026-03-09 14:20:17 +01:00
dahn 9bbd32a8ef
Add DaanHoogland to the list of contributors 2026-03-09 14:14:12 +01:00
Abhishek Kumar c3d6a8cff7
server: fix templatetype during iso upload (#12151) 2026-03-09 14:20:28 +05:30
Suresh Kumar Anaparti 58916eb608
Use lateral join (introduced in MySQL 8.0.14) with subquery on user_statistics table in account_view for netstats (#12631) 2026-03-05 20:18:58 +01:00
dahn 120a43648b
set width of dropdown select items for Network Offering during add tier dialog (#11899) 2026-03-05 19:52:28 +01:00
GaOrtiga 7ad68aafa5
Enable defining a network as redundant during restart through the UI (#7405)
Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-03-04 17:00:54 +01:00
Suresh Kumar Anaparti 75620309c2
Merge branch '4.22' 2026-03-04 21:13:01 +05:30
Suresh Kumar Anaparti 65e54091ff
Merge branch '4.20' into 4.22 2026-03-04 21:12:15 +05:30
Andrei Mizurou 9cc6c09b9e
Remove broken ViserJS attribution link from UI README (#12724) 2026-03-03 16:15:09 +01:00
dahn 608345d165
Update collaborators list in .asf.yaml
Removed several collaborators from the .asf.yaml file.
2026-03-02 09:26:41 +01:00
Vishesh 6516f7f1aa
Fix query execution in countVgpuVMs (#12713) 2026-02-27 18:23:25 +05:30
Suresh Kumar Anaparti 9e386a3128
PowerFlex/ScaleIO client initialization, authentication and command execution improvements (#12391)
* PowerFlex/ScaleIO client initialization, authentication and command execution improvements

* Migrate VM with volume not supported yet for PowerFlex/ScaleIO

* review changes
2026-02-26 09:23:41 -03:00
Nicolas Vazquez 6419e1c825
[VMware to KVM Migration] Fix unused convert env vars (#11947)
* Fix unused convert env vars

* Address review comments

* Small fix to invoke internal method
2026-02-26 06:21:43 -03:00
Suresh Kumar Anaparti da85858e93
unit test fix (after merge) 2026-02-26 12:01:15 +05:30
Suresh Kumar Anaparti a8bd02f8ba
Merge branch '4.22' 2026-02-26 11:12:20 +05:30
Suresh Kumar Anaparti b74f21b967
Merge branch '4.20' into 4.22 2026-02-26 11:11:41 +05:30
Suresh Kumar Anaparti 17ec4fc31c
UI: Fix duplicate quickview (for provider column) in backup repository (#11849)
* UI: Fix quickview (for provider column) in backup repository

* Consolidated quickview checks with first column, column key

* quickViewEnabled condition update
2026-02-26 10:33:35 +05:30
Abhishek Kumar 95816b44e9 extensions: allow reserved resource details
Adds a new request parameter for create/updateExtension API to allow
operator to provide detail names for the extension resources which will be reserved to be used by the extension. The end user won't be able to view or add details with these details names for the resource.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-02-22 18:08:03 +01:00
Daniel Augusto Veronezi Salvador d11d182c71 [22.0] Fix resource limit reservation and check during StartVirtualMachine 2026-02-22 18:05:20 +01:00
Daniel Augusto Veronezi Salvador 3d678e726a [22.0] resource reservation on volume snapshot creation 2026-02-22 17:23:39 +01:00
Abhisar Sinha 7703fdacab [minio] Handle user's canned policy when a bucket is deleted 2026-02-22 16:20:58 +01:00
dahn 46a6bbad27 Fix: KVM Direct Download URL injection (#60)
Co-authored-by: nvazquez <nicovazquez90@gmail.com>
2026-02-22 16:19:56 +01:00
Daniel Augusto Veronezi Salvador 1f849caa0b [22.0] resource reservation on volume creation 2026-02-22 16:17:26 +01:00
Daniel Augusto Veronezi Salvador 831ef82ff9 [22.0] resource allocation vpc 2026-02-22 16:02:14 +01:00
Daniel Augusto Veronezi Salvador 8d269cf5be [22.0] Implement/fix limit validation for projects 2026-02-22 16:01:34 +01:00
Daniel Augusto Veronezi Salvador 003c840817 [22.0] resource instance limits 2026-02-22 15:42:31 +01:00
Daniel Augusto Veronezi Salvador 37e3657770 [22.0] resource allocation 2026-02-22 15:41:13 +01:00
Suresh Kumar Anaparti 30e6c224bd
Merge branch '4.22' 2026-02-19 13:20:04 +05:30
Suresh Kumar Anaparti 5caf6cd043
Merge branch '4.20' into 4.22 2026-02-19 13:19:14 +05:30
Daan Hoogland c0db75b9fa agentic workflow daily report 2026-02-18 09:35:17 +01:00
dahn a1bcae9213
Agentic workflow experiment (#12652) 2026-02-17 16:11:01 +01:00
dahn 62eb4b7828
Remove acs-robot from collaborators list 2026-02-17 15:47:14 +01:00
dahn 22cda0c77b
constructing the expiry Prometheus Item according to new format (#12653) 2026-02-17 14:41:58 +01:00
Daan Hoogland a7dc5efad5 Merge release branch 4.22 to main
* 4.22:
  Fix issue when restoring backup after migration of volume (#12549)
  Usage: Heartbeat should not schedule usage job when a job is already running (#12616)
  Allow limit queries without random ordering (#12598)
  engine/schema: fix cluster/zone settings with encrypted values (#12626)
  Fix injection of preset variables into the JS interpreter (#12515)
  Fix issue with multiple KVM Host entries in host table (#12589)
  Add a Prometheus metric to track host certificate expiry (#12613)
  ssvm: delete temp directory while deleting entity download url (#12562)
2026-02-17 11:55:04 +01:00
Daan Hoogland 11df71e55c Merge branch '4.20' into '4.22' 2026-02-17 11:53:08 +01:00
Manoj Kumar c79b33c1fb
Allow enforcing password change for a user after reset by admin (root/domain) (#12294)
* API modifications for passwordchangerequired

* ui login flow for passwordchangerequired

* add passwordchangerequired in listUsers API response, it will be used in UI to render reset password form

* cleanup redundant LOGIN_SOURCE and limiting apis for first time login

* address copilot comments

* allow enforcing password change for all role types and update reset pwd flow for passwordchangerequired

* address review comments

* add unit tests

* cleanup ispasswordchangerequired from user_view

* address review comments

* 1. Allow enforcing password change while creating user
2. Admin can enforce password change on next login with out resetting password

* address review comment, add unit test

* improve code coverage

* fix pre-commit license issue

* 1. allow enter key to submit change password form
2. hide force password reset for disabled/locked user in ui

* 1. throw exception when force reset password is done for locked/disabled user/account
2. ui validation on current and new password being same
3. allow enforce change password for add user until saml is not enabled

* allow oauth login to skip force password change
2026-02-16 16:01:42 +05:30
dahn b1edfb8d60
Remove and Update collaborators list in .asf.yaml (#12627) 2026-02-12 08:55:40 +01:00
Daan Hoogland d3e1976912 Merge release branch 4.22 to main
* 4.22:
  Fixes issue with loading Capacity dashboard when mulitple backup providers configured (#12550)
2026-02-09 13:06:28 +01:00
Daan Hoogland 7324ef45d4 Merge branch '4.20' into 4.22 2026-02-09 13:05:08 +01:00
Suresh Kumar Anaparti 408e8c079d
Merge branch '4.22' 2026-02-05 21:42:47 +05:30
Daan Hoogland e929f2024a Merge branch '4.22' 2026-02-05 16:07:46 +01:00
Suresh Kumar Anaparti 53c98c33e6
ui build fixes (after merge) 2026-02-05 20:36:41 +05:30
Daan Hoogland cd6a8f61ca Merge branch '4.20' into 4.22 2026-02-05 15:32:36 +01:00
Erik Böck e32d08e50e
Create new generic method for resource UUID obtention in event's descriptions (#12502) 2026-02-05 11:23:40 +01:00
Wei Zhou b869913529
noVNC: support Spanish Latin American keyboard on VMware (#12484)
* noVNC: support Spanish Latin American keyboard

* Update server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
2026-02-02 15:16:54 +05:30
Suresh Kumar Anaparti a5b6bc3be6
Merge branch '4.22' 2026-01-30 21:15:58 +05:30
Suresh Kumar Anaparti 30d306622a
Merge branch '4.20' into 4.22 2026-01-30 21:15:21 +05:30
Vishesh ef60aa5601
Restart xl2tpd service when the VPN configuration is modified (#12422) 2026-01-30 17:46:12 +05:30
Daan Hoogland 7b94ccc443 eofFix 2026-01-30 11:53:40 +01:00
K Viddya a38205ebf0
Add s390x Support for Cloudstack Simulator (#12337)
Signed-off-by: Viddya K <viddya.k@ibm.com>
Signed-off-by: Niyam Siwach <niyam@ibm.com>
Co-authored-by: root <root@c63716v1.fyre.ibm.com>
2026-01-30 11:22:07 +01:00
salfers e1d512e5fd
Set CORS headers for both http/https in SSVM apache config (#9389) 2026-01-30 11:53:44 +02:00
Abhishek Kumar c1c1b0e765
extension: improve host vm power reporting (#11619)
* extension/proxmox: improve host vm power reporting

Add `statuses` action in extensions to report VM power states

This PR introduces support for retrieving the power state of all VMs on a host directly from an extension using the new `statuses` action.
When available, this provides a single aggregated response, reducing the need for multiple calls.

If the extension does not implement `statuses`, the server will gracefully fall back to querying individual VMs using the existing `status` action.

This helps with updating the host in CloudStack after out-of-band migrations for the VM.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* address review

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-30 14:07:22 +05:30
Vishesh a7178ee687
Fix mvn warnings (#10909)
* Replace maven-jgit-buildnumber-plugin with thread safe buildnumber-maven-plugin

* Fix mysql-connector-java warning

* Fix thread safe warning for properties-maven-plugin

* Fix mvn build - marvin warnings

* Update tools/marvin/README.md

* Update tools/marvin/README.md

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

---------

Co-authored-by: dahn <daan.hoogland@gmail.com>
2026-01-30 14:01:57 +05:30
Abhishek Kumar 18972caf5f
api,server: allow cleaning up vm extraconfig (#11974) 2026-01-30 13:54:01 +05:30
Wei Zhou 81f16b6261
engine/schema: prepend algorithm to checksum during systemvm template registration (#12165)
* engine/schema: prepend algorithm to checksum during systemvm template registration

* Update utils/src/main/java/org/apache/cloudstack/utils/security/DigestHelper.java
2026-01-30 09:01:50 +02:00
dependabot[bot] 9d523cbbfe
Bump org.apache.maven.plugins:maven-war-plugin from 3.4.0 to 3.5.1 (#12497)
Bumps [org.apache.maven.plugins:maven-war-plugin](https://github.com/apache/maven-war-plugin) from 3.4.0 to 3.5.1.
- [Release notes](https://github.com/apache/maven-war-plugin/releases)
- [Commits](https://github.com/apache/maven-war-plugin/compare/maven-war-plugin-3.4.0...maven-war-plugin-3.5.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-war-plugin
  dependency-version: 3.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-30 08:57:24 +02:00
Wei Zhou bb391c3deb
test: increase timeout in test_human_readable_logs.py (#11972) 2026-01-30 08:50:44 +02:00
Dattu bac3421da4
Fixed: unnecessary regeneration of SSH keys in developer mode when they already existed. (#12059) 2026-01-30 08:42:41 +02:00
Abhishek Kumar bb8e7d39e6
api,server: allow configuring repetitive alerts (#11325)
* api,server: allow configuring repetitive alerts

Fixes #6613

Introduces support for configuring additional alert types that can be published repeatedly, beyond the default set.

Operators can now use the dynamic configuration `alert.allowed.repetitive.types` to specify a comma-separated list of alert type names that should be allowed for repetitive publication.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* add tests

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* test fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* allow repetition for custom alerts

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* remove refactoring

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-30 08:41:25 +02:00
Abhishek Kumar 8bea89a80b
Merge remote-tracking branch 'apache/4.22' 2026-01-30 10:09:16 +05:30
Abhishek Kumar 29ce03e946
Merge remote-tracking branch 'apache/4.20' into 4.22 2026-01-30 10:08:36 +05:30
Abhishek Kumar d7bdbcc4ed
pre-commit: fix inconsistent license (#12551)
Fix inconsistent license with UI .vue file.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-30 10:05:50 +05:30
Suresh Kumar Anaparti ffb8b91ff5
Merge branch '4.22' 2026-01-29 19:42:07 +05:30
Suresh Kumar Anaparti f5778eaa32
Merge branch '4.20' into 4.22 2026-01-29 19:41:29 +05:30
Daniel Augusto Veronezi Salvador 8c2a030816
Fix query filter and units tests (#12184) 2026-01-29 14:51:22 +02:00
Abhishek Kumar 3626c515e8
server: fix listing resource limits (#12188) 2026-01-29 12:36:16 +01:00
Manoj Kumar 0b62fb5e20
Add cloud image downloader script (#11918) 2026-01-29 11:36:19 +01:00
Suresh Kumar Anaparti a55f85af50
Merge branch '4.22' 2026-01-29 15:55:03 +05:30
Suresh Kumar Anaparti d700e2db64
Merge branch '4.20' into 4.22 2026-01-29 15:51:58 +05:30
Bernardo De Marco Gonçalves c681d0d0a2
Change `vmsnapshot.max` setting scope to the account level (#11616) 2026-01-29 10:01:54 +01:00
Abhishek Kumar 9b4f16b73f
api,server: apis return their http request type (#11382)
* api,server: apis return their http request type

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix and unit test

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* more test

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* address copilot

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update plugins/api/discovery/src/main/java/org/apache/cloudstack/api/response/ApiDiscoveryResponse.java

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: dahn <daan@onecht.net>
Co-authored-by: Harikrishna <harikrishna.patnala@gmail.com>
2026-01-29 13:52:07 +05:30
Manoj Kumar a8f1e4a5ba
import network acl rules using csv (#12013) 2026-01-29 09:10:28 +01:00
Abhishek Kumar bd459a4c4c
ui: allow viewing hosts from management server connected agents (#12149)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-29 10:00:54 +02:00
Abhishek Kumar 10e0d42f45
ui: introduce section-level “advisories” with quick-fix actions (#11763)
* ui: introduce section-level “advisories” with quick-fix actions

This change adds a lightweight “advisories” mechanism to section configs and ships the first advisory to help operators satisfy some of the CKS prerequisites.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix endpoint.url check

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* label consistency

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update ui/src/components/view/AdvisoriesView.vue

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* improvements

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* remove comments

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* allow disabling

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-29 09:37:52 +02:00
Abhishek Kumar 286e406e38
ui: clear selected resource when no items in listview (#11946)
Fixes #11922

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-29 12:05:51 +05:30
Suresh Kumar Anaparti 65e9bebc69
Show parent snapshot (along with the chain size) for incremental snapshots (#12468)
* Show parent snapshot (along with the chain size) for incremental snapshots

* review

* review changes
2026-01-29 08:16:10 +02:00
Abhishek Kumar 98debd235f
gha: fix duplicate key for stale workflow
Fixes failing pre-commit GHA

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-29 10:35:32 +05:30
Harikrishna 106f478e2c
Remove unnecessary stubbings in ManagementServerMaintenanceManagerImplTest (#11914) 2026-01-28 18:16:38 +01:00
dependabot[bot] d83c2e4225
Bump com.vmware.vapi:vapi-runtime from 2.40.0 to 2.61.2 (#12495) 2026-01-28 15:30:46 +01:00
Pearl Dsilva 7786cf93c2
Veeam: Use restore timeout as an interval as opposed to a counter (#11772)
* Veeam: Use restore timeout as a time interval as opposed to a counter

* fix log

* fix unit test

* remove unused imports

* fix comment

* unused import

* change to while - issure refactoring
2026-01-28 16:13:56 +02:00
Daman Arora 9956d32548
Fix delete snapshot policy expunged volume (#12474)
* use findByIdIncludingRemoved for volume retrieval in snapshot policy validation

* add unit tests

* add cleanup for orphan snapshot policies

* delete snapshot policies when expunging volumes

* update orphan cleanup to remove policies for volumes that are in expunged state or null

---------

Co-authored-by: Daman Arora <daman.arora@shapeblue.com>
2026-01-28 16:11:14 +02:00
Suresh Kumar Anaparti 059debf212
Add the procedure files for insert extensions and update guest os category (#12482)
* Add the procedure files for insert extensions and update guestos category

* fixed indentation

* Apply suggestions from code review

Co-authored-by: Vishesh <8760112+vishesh92@users.noreply.github.com>

---------

Co-authored-by: Vishesh <8760112+vishesh92@users.noreply.github.com>
2026-01-28 16:09:37 +02:00
Abhishek Kumar 9fc93af85f
ui: allow actions for other users of root admin (#11319)
Fixes #10306

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-28 16:06:04 +02:00
Davi Torres ded975ceb8
Improve message "Network is unavailable. Please contact administrator" (#11981)
* Improve message "Network is unavailable. Please contact administrator"

This trivial change provide more details for root administrators during troubleshooting.

See discussion https://github.com/apache/cloudstack/discussions/11980

* Improve error message for unavailable guest network

* Update engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

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

* Fix and refactor

---------

Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: nvazquez <nicovazquez90@gmail.com>
2026-01-28 15:43:05 +02:00
Abhishek Kumar 69c69dc537
server,engine-schema: make config - use.https.to.upload zone scoped (#11539) 2026-01-28 13:23:39 +01:00
dahn 37507e8799
address warnings in capacity manager (#11971)
Co-authored-by: Daan Hoogland <dahn@apache.org>
2026-01-28 17:41:24 +05:30
Wei Zhou 6a04e14f87
VR: fix dns list in redundant VPC VRs (#12161) 2026-01-28 13:09:10 +01:00
Suresh Kumar Anaparti 4d35d68e4e
Fix url in password reset email (#12078) 2026-01-28 12:47:50 +01:00
Rohit Yadav 8c2ba2b341
ui: bump nodejs v24 LTS usage (#12471) 2026-01-28 12:16:34 +01:00
Pearl Dsilva 38e30a116c
Add support for vTPM for XenServer and XCP-ng 8.3/8.4 (#12263)
* XenServer 8.4/XCP-ng 8.3: Support vTPM

* fix issue

* add log for windows 11 or other such guests OSs that require vtpm

* remove secure bootmode requirement

* Fix uefi setting on host for xenserver 8.4
2026-01-28 13:12:32 +02:00
dahn 0e7f74839a
Add configuration for archiving stale issues (#12293) 2026-01-28 15:18:27 +05:30
Tonitzpp 434e472ef8
Change to display if public IPs are reserved in the tab (#12461)
Co-authored-by: toni.zamparetti <toni.zamparetti@scclouds.com.br>
2026-01-28 10:10:43 +01:00
dependabot[bot] 7001d43dbf
Bump org.codehaus.mojo:properties-maven-plugin from 1.0-alpha-2 to 1.2.1 (#12508) 2026-01-28 14:09:29 +05:30
Abhishek Kumar 1b2ae13df7
ui: add cache for oslogo request using osId (#11422)
When OsLogo component is used in the items of a list having same OS type
it was causing listOsTypes API call multiple time. This change allows
caching request and response value for 30 seconds. Caching behaviour is
controlled using `useCache` flag.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-28 12:40:34 +05:30
Abhishek Kumar 25cb545325
Merge remote-tracking branch 'apache/4.22' 2026-01-28 11:33:03 +05:30
Abhishek Kumar 276eb8111d
Merge remote-tracking branch 'apache/4.20' into 4.22 2026-01-28 11:32:18 +05:30
Wei Zhou 4761935145
server: add options for kvm.guest.os.machine.type (#12414) 2026-01-28 11:29:31 +05:30
Wei Zhou 2bfc9cb8eb
CKS: skip default egress policy check for vpc network offerings (#11998)
This PR fixes #11995

Steps to reproduce the issue
- create a vpc
- create a vpc tier with default offering `DefaultIsolatedNetworkOfferingForVpcNetworks`
- register CKS ISO
- create CKS on the vpc tier

expected: succeed
actual: failed with error `Kubernetes service has not been configured properly to provision Kubernetes clusters`
2026-01-28 11:17:14 +05:30
Abhishek Kumar 572aa19564
ui: show usage server restart message on usage config change (#11969)
Fixes #10853

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-28 11:01:53 +05:30
Manoj Kumar 21d5c10850
Apply reordered ACL list to VR router (#12525)
This PR address #9398
2026-01-28 10:55:59 +05:30
cheng102e 062b98a51e
fix: clean magic value, and update if-else to switch (#8848)
* fix: clean magic value, and update if-else to switch

* fix: return the (String args[])

* review

---------

Co-authored-by: jiejc1 <jiejc1@lenovo.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-01-28 10:15:11 +05:30
Tonitzpp 66665b883c
Changed error message when snapshot is not on secondary when trying to perform download (#12462)
Co-authored-by: toni.zamparetti <toni.zamparetti@scclouds.com.br>
2026-01-28 10:12:57 +05:30
Abhishek Kumar 5aced73250
ui: reset configuration allowed only when value not default (#11728) 2026-01-27 16:48:18 +01:00
Daan Hoogland cb822feb72 Merge branch '4.22' 2026-01-27 16:21:59 +01:00
Daan Hoogland 75db42bca6 Merge branch '4.20' into 4.22 2026-01-27 15:23:23 +01:00
Wei Zhou 9dee137265
debian/control: remove python2 as dependency of build environment (#12213)
This fixes the issue that ACS cannot be packaged on Ubuntu 24.04 due to unsupported python2
verified by `apt-get build-dep .`
2026-01-27 15:39:08 +02:00
Abhishek Kumar d722c9551a
ui: fix form data double fetch/reset DeployVMFromBackup form data by ownership selection (#11706)
* ui: fix form data double fetch/reset DeployVMFromBackup form data by ownership selection

Related #11705

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-27 14:46:06 +02:00
Lorenzo Tanganelli d6c192c0f0
fix template id unmanaged vm (#12288)
* fix template id unmanaged vm

* Update == to equals

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

---------

Co-authored-by: dahn <daan.hoogland@gmail.com>
2026-01-27 14:45:16 +02:00
Abhisar Sinha 2056c582f1
Fix logging of forwarded IPs in logs (#11854) 2026-01-27 18:01:02 +05:30
Erik Böck cd2d71104e
Implement SSVM storage network IP to API response and GUI details tab (#11979)
* Implement SSVM storage network IP to API response and GUI details tab

* remove network mention from attribute name

* remove network from serialized name

* fix parameter name in the UI
2026-01-27 17:29:06 +05:30
Erik Böck 416568a373
Fix typo in finalyzeAccountId (#11990)
* Fix typo in finalyzeAccountId

* fix tests
2026-01-27 16:17:14 +05:30
Abhishek Kumar 5fd5b62570
server: fix remove management server (#12147)
Fixes #12137

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-27 15:01:20 +05:30
Abhishek Kumar ac2242ece2
api,server,ui: support tags for domains (#11964)
* api,server,ui: support tags for domains

Fixes #11608

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* address copilot comment

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix import

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Added tags support to listDomains API

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
2026-01-27 14:37:51 +05:30
Erik Böck cabd9a98e1
Implemented auto refresh button for VM metrics (#10900)
* added auto refresh button for vm metrics

* refactored getStartDate method and fixed auto refresh date period not being update

* switch variables from var to const
2026-01-27 09:59:12 +02:00
Abhisar Sinha ca07663718
Show backup offerings with userDrivenBackupsAllowed=false to all users (#11889) 2026-01-27 09:53:17 +02:00
Sinscerly f292143af8
Fix/prometheus metadata sorting (#12112)
* fix prometheus metadata and sorted. Adds in TYPE and HELP

* fix random linting issue
2026-01-27 08:47:42 +02:00
GaOrtiga 128dbe2c0b
Refactor configuration SystemVMDefaultHypervisor (#8934)
* refactor configuration SystemVMDefaultHypervisor

* change variable name

---------

Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
2026-01-27 10:36:59 +05:30
Bernardo De Marco Gonçalves 9b0c28c16d
fix regression in the listBackupSchedules API (#12402) 2026-01-26 15:00:53 -05:00
John Bampton 88181ebe72
Standardize and auto add license headers to all cfg files with pre-commit (#12230) 2026-01-26 15:59:31 +02:00
Daan Hoogland 7178bfe9eb Merge release branch 4.22 to main
* 4.22:
  merge forward error
2026-01-26 14:19:04 +01:00
Daan Hoogland d50899427a merge forward error 2026-01-26 14:17:38 +01:00
Daan Hoogland e3999923a7 Merge release branch 4.22 to main
* 4.22:
  fix install path for systemvm templates when introducing new sec storage (#11605)
  fix Sensitive Data Exposure Through Exception Logging in OVM Hypervis… (#12032)
  Fix snapshot physical size after migration (#12166)
  ConfigDrive: use file absolute path instead of canonical path to create ISO (#11623)
  Add log for null templateVO (#12406)
  snapshot: fix listSnapshots for volume which got delete and whose storage pool got deleted (#12433)
  Notify user if template upgrade is not required (#12483)
  Fix: proper permissions for systemvm template registrations on hardened systems (#12098)
  Allow modification of user vm details if user.vm.readonly.details is empty (#10456)
  NPE fix while deleting storage pool when pool has detached volumes (#12451)
2026-01-26 13:32:56 +01:00
Daan Hoogland edb62b490c Merge branch '4.20' into 4.22 2026-01-26 13:30:26 +01:00
Rohit Yadav 315cd52fd1
snapshot: fix listSnapshots for volume which got delete and whose storage pool got deleted (#12433)
This fixes the case when the storage pool is removed as well the KVM
host and the subsequent volumes on the host. When that happened, listing
snapshots (for recovery purposes) cause NPE as the pool_id was null, but
last_pool_id for the related destroyed volume wasn't null. This adds a
fallback logic.

Signed-off-by: Rohit Yadav <rohit@yadav.cloud>
2026-01-26 12:53:47 +02:00
Suresh Kumar Anaparti 4bcf3ea57d
Merge branch '4.22' 2026-01-26 12:46:54 +05:30
Suresh Kumar Anaparti 000919d6e5
Merge branch '4.20' into 4.22 2026-01-26 12:46:09 +05:30
Suresh Kumar Anaparti 420bf6dff8
Merge branch '4.22' 2026-01-22 13:24:08 +05:30
Suresh Kumar Anaparti b1f870ae83
Merge branch '4.20' into 4.22 2026-01-22 13:23:21 +05:30
Wei Zhou 036489b288
CKS: fix resource limitation check on cpu when scale cks cluster (#12379) 2026-01-21 09:59:21 +01:00
dependabot[bot] 1b0a036a5b
Bump ads.version from 2.0.0.AM25 to 2.0.0.AM27 (#12269)
Bumps `ads.version` from 2.0.0.AM25 to 2.0.0.AM27.

Updates `org.apache.directory.server:apacheds-server-integ` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

Updates `org.apache.directory.server:apacheds-core-constants` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

Updates `org.apache.directory.server:apacheds-core-annotations` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

Updates `org.apache.directory.server:apacheds-core` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

Updates `org.apache.directory.server:apacheds-protocol-ldap` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

Updates `org.apache.directory.server:apacheds-jdbm-partition` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

Updates `org.apache.directory.server:apacheds-ldif-partition` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

---
updated-dependencies:
- dependency-name: org.apache.directory.server:apacheds-server-integ
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.server:apacheds-core-constants
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.server:apacheds-core-annotations
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.server:apacheds-core
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.server:apacheds-protocol-ldap
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.server:apacheds-jdbm-partition
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.server:apacheds-ldif-partition
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 12:07:23 +05:30
dependabot[bot] e2f4ed9dcf
Bump commons-codec:commons-codec from 1.15 to 1.20.0 (#12303)
Bumps [commons-codec:commons-codec](https://github.com/apache/commons-codec) from 1.15 to 1.20.0.
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.15...rel/commons-codec-1.20.0)

---
updated-dependencies:
- dependency-name: commons-codec:commons-codec
  dependency-version: 1.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 12:06:44 +05:30
Suresh Kumar Anaparti 04b58acdd6
Merge branch '4.22' 2026-01-19 19:50:51 +05:30
Suresh Kumar Anaparti 3828a3b744
Merge branch '4.20' into 4.22 2026-01-19 19:50:10 +05:30
Pearl Dsilva 8b2f1f19c2
Support dedicating backup offerings to domains (#12194)
* Add support for dedicating backup offerings to domains

* Add tests and UI support and update response params

* add license header

* exclude backupofferingdetailsvo from sonar

* fix pre-commit checks - missing / extra EOF line

* add test

* EOF

* filter backup offerings by domain id

* add unit tests

* add more unit tests and remove response file from code coverage check

* update checks

* address review comments: extract common code, fix tests

* added bean definition

* address comments

* add unit tests to increase coverage

* pre-commit check failure fix

* address merge issue

* allow updating backup offering when only domain id is modified
2026-01-19 14:21:47 +05:30
Abhisar Sinha 002d9768b2
Add settings to mark cryptographic algorithms in vpn customer gateways as excluded or obsolete (#12193)
This PR introduces several configuration settings using which an operator can mark certain cryptographic algorithms and parameters as excluded or obsolete for VPN Customer Gateway creation for Site-to-Site VPN.

Cloud providers following modern security frameworks (e.g., ISO 27001/27017) are required to enforce and communicate approved cryptographic standards. CloudStack currently accepts several weak or deprecated algorithms without guidance to users. This PR closes that gap by giving operators explicit control over what is disallowed vs discouraged, improving security posture without breaking existing deployments.

These settings are:

1. vpn.customer.gateway.excluded.encryption.algorithms
2. vpn.customer.gateway.excluded.hashing.algorithms
3. vpn.customer.gateway.excluded.ike.versions
4. vpn.customer.gateway.excluded.dh.group
5. vpn.customer.gateway.obsolete.encryption.algorithms
6. vpn.customer.gateway.obsolete.hashing.algorithms
7. vpn.customer.gateway.obsolete.ike.versions
8. vpn.customer.gateway.obsolete.dh.group
2026-01-19 13:18:37 +05:30
Wei Zhou b31c2f4cae
Revert "Review comment on pull request #12436"
This reverts commit a566af35f5.
2026-01-15 19:17:12 +01:00
Wei Zhou a566af35f5 Review comment on pull request #12436 2026-01-15 19:14:51 +01:00
Suresh Kumar Anaparti 507c4cd128
Merge branch '4.22' 2026-01-15 10:09:09 +05:30
Suresh Kumar Anaparti b5fd39fca0
Merge branch '4.20' into 4.22 2026-01-15 10:08:27 +05:30
Vishesh b8ed34e2a8
Reset modifier button's state (#12187) 2026-01-13 13:48:55 +01:00
Abhishek Kumar 538578366a Merge remote-tracking branch 'apache/4.22' 2026-01-13 11:49:07 +05:30
Abhishek Kumar 031fbf43d4 Merge remote-tracking branch 'apache/4.20' into 4.22 2026-01-13 11:48:05 +05:30
Suresh Kumar Anaparti b8813c7b24
UI: Add info for 'Use primary storage replication' in snapshot view(s) (#11943) 2026-01-12 16:50:15 +05:30
Erik Böck 2358632253
Fixed User type accounts being able to change resource limits of their own domain and account (#12046)
Co-authored-by: Lucas Martins <56271185+lucas-a-martins@users.noreply.github.com>
2026-01-12 08:20:31 +01:00
Suresh Kumar Anaparti 2399edd380
[UI] Fix for the login url with nested redirect parameters (#12356) 2026-01-12 12:11:45 +05:30
Nicolas Vazquez 04875f1517
Improve logs for VM migrations (#12332) 2026-01-09 17:50:27 +01:00
Daan Hoogland 2811217578 Merge branch '4.22' 2026-01-09 15:00:05 +01:00
Daan Hoogland e25cf437c0 Merge branch '4.20' into 4.22 2026-01-09 14:28:12 +01:00
Suyang(Dawson) Chen 1b861dad48
Cleanup: Standardize logger message formatting in ApiServer.java (#11188) 2026-01-09 09:30:17 +01:00
Erik Böck 1ef6365771
Change internal ID to UUID in user disable event (#11824) 2026-01-09 09:23:46 +01:00
Bernardo De Marco Gonçalves bc3d7c314b
Change the `value` parameter of the `updateConfiguration` API to be required (#10790) 2026-01-09 09:17:44 +01:00
Tonitzpp bc76f2042d
Change migration volume exception messages (#12367)
Co-authored-by: toni.zamparetti <toni.zamparetti@scclouds.com.br>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-08 13:55:34 +01:00
John Bampton fd1c67f473
Standardize and auto add license headers to properties files (#12231) 2026-01-08 15:56:40 +05:30
John Bampton e47d7bc6ff
[CI] Dependabot: add a cooldown period for new releases (#12384) 2026-01-07 17:22:52 +01:00
Abhishek Kumar eedd32971f
Merge remote-tracking branch 'apache/4.22' 2026-01-07 13:11:55 +05:30
Abhishek Kumar 425c4e3312
Merge remote-tracking branch 'apache/4.20' into 4.22 2026-01-07 13:10:41 +05:30
dahn c465caf81e
Adjust close periods (#12376) 2026-01-06 12:47:37 +05:30
Suresh Kumar Anaparti 2d4b7ba357
Add mountopts to backup repository response (#12360) 2026-01-06 12:08:18 +05:30
Suresh Kumar Anaparti 4628385051
Merge branch '4.22' 2026-01-05 16:17:50 +05:30
Suresh Kumar Anaparti 959c5fff68
Merge branch '4.20' into 4.22 2026-01-05 15:57:26 +05:30
Abhishek Kumar cd55796972
webhook: fixes, filter enhancement (#12023)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-05 09:12:06 +01:00
Tonitzpp 81b991ae9c
Show volume UUIDs in the backup details page (#12156)
Co-authored-by: toni.zamparetti <toni.zamparetti@scclouds.com.br>
2026-01-05 09:07:19 +01:00
Pearl Dsilva 7ff76cb2d7
Protect upgrades from failures (#12319) 2025-12-30 21:46:04 +01:00
Pearl Dsilva 7a11bd2f98
CKS: Fix issue with scaling down CKS Nodes when deployed in HA mode (#12302) 2025-12-30 13:08:13 +01:00
Tonitzpp 46cb805c90
Removal of internal ID in backup event descriptions (#12197) 2025-12-30 09:37:09 +01:00
Suresh Kumar Anaparti 40d21f093f
Merge branch '4.22' 2025-12-29 13:37:12 +05:30
Suresh Kumar Anaparti 6a2d91ed8a
Merge branch '4.20' into 4.22 2025-12-29 13:21:17 +05:30
Abhishek Kumar 34b8870f59
systemvm-template: support on-demand download during setup and registration (#11656)
Bundling all hypervisor SystemVM templates in release packages simplifies installs but inflates build time and artifact size. This change enables downloading templates on demand when they’re not found after package installation. The download path is wired into both cloud-setup-management and the existing SystemVM template registration flow.

For connected or mirrored environments, a repository URL prefix can be provided to support air-gapped setups: pass --systemvm-templates-repository <URL-prefix> to cloud-setup-management, or set system.vm.templates.download.repository=<URL-prefix> in server.properties for post-setup registration.

If templates are already present (bundled or preseeded), behavior is unchanged and no download is attempted.

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-26 11:36:32 +05:30
argusb 5bf869c803
Replace deprecated 'egrep' commands with 'grep -E'. (#12306)
Co-authored-by: Sander Grendelman <sander.grendelman@axians.com>
2025-12-22 14:27:41 +01:00
Manoj Kumar e0c13cc3ec
Cleanup userconcentratedpod_random and userconcentratedpod_firstfit allocation algorithms (#12233)
* Cleanup userconcentratedpod_random and userconcentratedpod_firstfit allocation algorithm

* use firstfit instead of random for userconcentratedpod_firstfit
2025-12-22 14:25:33 +01:00
Daan Hoogland 22da57f922 Merge branch '4.22' 2025-12-22 14:13:50 +01:00
Daan Hoogland 55ab7c5589 Merge branch '4.20' into 4.22 2025-12-22 13:23:37 +01:00
Daan Hoogland e2d3773362 Merge release branch 4.22 to main
* 4.22:
  Update templateConfig.sh to not break with directorys with space on t… (#10898)
  Fix VM and volume metrics listing regressions (#12284)
  packaging: use latest cmk release link directly (#11429)
  api:rename RegisterCmd.java => RegisterUserKeyCmd.java (#12259)
  Prioritize copying templates from other secondary storages instead of downloading them (#10363)
  Show time correctly in the backup schedule UI  (#12012)
  kvm: use preallocation option for fat disk resize (#11986)
  Python exception processing static routes fixed (#11967)
  KVM memballooning requires free page reporting and autodeflate (#11932)
  api: create/register/upload template with empty template tag (#12234)
2025-12-22 10:29:24 +01:00
Daan Hoogland cee330e7c8 Merge branch '4.20' into 4.22 2025-12-22 10:27:57 +01:00
dependabot[bot] eb93f0105e
Bump com.zaxxer:HikariCP from 5.1.0 to 7.0.2 (#12266)
Bumps [com.zaxxer:HikariCP](https://github.com/brettwooldridge/HikariCP) from 5.1.0 to 7.0.2.
- [Changelog](https://github.com/brettwooldridge/HikariCP/blob/dev/CHANGES)
- [Commits](https://github.com/brettwooldridge/HikariCP/compare/HikariCP-5.1.0...HikariCP-7.0.2)

---
updated-dependencies:
- dependency-name: com.zaxxer:HikariCP
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-19 15:07:29 +05:30
K Viddya 558232e8e6
Feature s390x multiarch support (#12214)
Signed-off-by: Niyam Siwach <niyam@ibm.com>
Signed-off-by: Viddya K <viddya.k@ibm.com>
Co-authored-by: root <root@c32379v1.fyre.ibm.com>
2025-12-19 10:06:58 +01:00
Klaus de Freitas Dornsbach 13f805fbf3
Log4j2 refactor cloud api module (#8728) 2025-12-19 14:15:56 +05:30
Wei Zhou 8936e4c535
api:rename RegisterCmd.java => RegisterUserKeyCmd.java (#12259) 2025-12-18 11:53:00 +01:00
Phsm Qwerty bb5da0e49c
security groups: conntrack only if needed (#10594)
The conntrack is disabled if the security group allows all traffic.
Also, refactored the code a little.
2025-12-18 11:49:41 +01:00
dependabot[bot] 28820f6e25
Bump org.influxdb:influxdb-java from 2.22 to 2.25 (#12270)
Bumps [org.influxdb:influxdb-java](https://github.com/influxdata/influxdb-java) from 2.22 to 2.25.
- [Release notes](https://github.com/influxdata/influxdb-java/releases)
- [Changelog](https://github.com/influxdata/influxdb-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/influxdata/influxdb-java/compare/influxdb-java-2.22...influxdb-java-2.25)

---
updated-dependencies:
- dependency-name: org.influxdb:influxdb-java
  dependency-version: '2.25'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 11:10:52 +01:00
dahn 91376c7994
cleanup LDAP code according to warnings (#11436)
Co-authored-by: Daan Hoogland <dahn@apache.org>
Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
2025-12-18 11:09:09 +01:00
John Bampton e21aacf5be
Bump `actions/cache` to `v5` (#12247) 2025-12-18 10:53:57 +01:00
Abhisar Sinha e9900aba23
Show time correctly in the backup schedule UI (#12012) 2025-12-17 14:47:28 +01:00
dependabot[bot] 10d76d3384
Bump cs.aws.sdk.version from 1.12.439 to 1.12.795 (#12267) 2025-12-17 13:51:52 +01:00
Vishesh 2ac2e5ba33
Github Action: Add action to auto close issues/PRs after a certain time (#8667)
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: Jonathan de Jong <jonathandejong02@gmail.com>
2025-12-17 13:10:17 +01:00
dahn 124fcde59c
unlink an ldap domain (#11962)
Co-authored-by: Daan Hoogland <dahn@apache.org>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-12-17 13:04:06 +01:00
Abhishek Kumar e08e66d66d
kvm: use preallocation option for fat disk resize (#11986)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-17 13:03:39 +01:00
Brad House de1b1d24c2
Python exception processing static routes fixed (#11967) 2025-12-16 20:07:22 +01:00
Brad House d5165183ea
KVM memballooning requires free page reporting and autodeflate (#11932) 2025-12-16 16:58:32 +01:00
John Bampton 53a39d3ff7
.github: Move `dependabot.yml` to the correct directory (#12243)
The `dependabot.yml` configuration file should be placed in the `.github` directory at the root of your repository.

Dependabot will not work if the file is placed in any other directory

Minor file extension rename for standardization
2025-12-16 14:11:04 +01:00
Daan Hoogland f06ac512fa merge forward 4.22 to main 2025-12-16 11:50:58 +01:00
Daan Hoogland 7aba434dc4 merge forward 4.20 to 4.22 LTS 2025-12-16 11:19:04 +01:00
Abhishek Kumar da1c7cebf9
server: trim autoscale Windows VM hostname (#11327)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2025-12-15 15:52:32 +01:00
Abhishek Kumar 39d0d62fdd
api,server: normalize string empty value on config update (#11770)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-15 15:43:00 +01:00
dahn f570e16836
.github: initial version of Code Owners (#12253)
* initial version of Code Owners

* Update .github/CODEOWNERS

---------

Co-authored-by: Daan Hoogland <dahn@apache.org>
Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
2025-12-15 11:04:45 +01:00
John Bampton 1919dcfb7c
pre-commit trailing-whitespace cleanup LICENSE/NOTICE (#12242) 2025-12-15 10:09:11 +01:00
Pearl Dsilva 0a13fb27f5
Prevent scaling of cluster if count / resources exceed account resource limits (#12167) 2025-12-12 13:57:15 +01:00
John Bampton f417c6b0a1
yamllint use `extends: default` (#12066) 2025-12-11 17:59:45 +01:00
John Bampton 78f9e6584b
UI(vue) + extras: fix bugs/spelling and standardize (#12073) 2025-12-11 16:41:50 +01:00
John Bampton cfe96026dc
Standardize and auto add license headers to all Vue files with pre-commit (#12081) 2025-12-10 16:21:41 +01:00
Pearl Dsilva 3c6484792d
UI: Create Account form to set proper domain and role based on route (#12200) 2025-12-09 10:56:04 +01:00
dahn 223fc2512c
Enhance NFS mount option check for empty response (#11839) 2025-12-09 10:51:42 +01:00
dahn 51910cd260
Add license information to dependabot.yaml
Added Apache License information to dependabot.yaml
2025-12-08 16:48:18 +01:00
dahn 5151f8dc6a
java dependabot file (#11409)
Co-authored-by: Daan Hoogland <dahn@apache.org>
2025-12-08 16:33:10 +01:00
dahn c81295439f
removed code in comments (#11145) 2025-12-08 16:31:48 +01:00
Lucas Martins 12f4321952
Changes error message when using invalid `endpoint.url` (#8603)
Co-authored-by: lucas.martins.scclouds <lucas.martins@scclouds.com.br>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
Co-authored-by: erikbocks <erik.bock@outlook.com>
2025-12-08 09:41:56 +01:00
Suresh Kumar Anaparti b0d74fe00c
Merge branch '4.22' 2025-12-05 18:59:03 +05:30
Suresh Kumar Anaparti a0ba2aaf3f
Merge branch '4.20' into 4.22 2025-12-05 18:41:18 +05:30
Abhisar Sinha 4379666fb6
Proxmox Extension : Make settings such as storage, disk_size,... (#12174)
Make storage, disk-size and os-type configurable in the Proxmox extension

Doc PR: apache/cloudstack-documentation#601

---------

Co-authored-by: dahn <daan.hoogland@gmail.com>
2025-12-03 17:05:22 +05:30
Abhishek Kumar 26009659f9
Merge remote-tracking branch 'apache/4.22' 2025-12-01 13:07:45 +05:30
Abhishek Kumar 2941b518ba
Merge remote-tracking branch 'apache/4.20' into 4.22 2025-12-01 13:05:08 +05:30
dahn f3a112fd9e
use upstream method for creating enums from strings (#12158)
Co-authored-by: Daan Hoogland <dahn@apache.org>
2025-12-01 08:33:14 +01:00
Wei Zhou 516012a0b4
ceph: fix offline volume migration between ceph pools (#12103) 2025-11-28 15:44:00 +01:00
John Bampton db6147060b
Rename PRE-COMMIT.md to PRE_COMMIT.md and fix link (#12157) 2025-11-28 10:01:38 +01:00
Harikrishna 5798fb43a3
Fix upgrade files (#12155) 2025-11-27 15:56:26 +01:00
Daan Hoogland 4e61ddd1bc import 2025-11-26 13:01:52 +01:00
Daan Hoogland 9032fe3fb5 merge LTS branch 4.22 into main 2025-11-26 11:55:50 +01:00
Daan Hoogland e23c7ef701 Merge release branch 4.20 to 4.22
* 4.20:
  fixed Password Exposure in IPMI Tool Command Execution (#12028)
  server: fix volume offering not updated after offering change (#12003)
  fix API Request Parameters Logged Credential Masking in ApiServer (#12020)
2025-11-26 11:31:27 +01:00
Abhisar Sinha e33f4754f5
Fix DB upgrade script for 4.22 (#12111) 2025-11-26 09:25:41 +01:00
Abhishek Kumar 9ec8cc4186
api,server,ui: improve listing public ip for associate (#11591)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-11-26 09:24:12 +01:00
João Jandre 8171d9568c
Block use of internal and external snapshots on KVM (#11039) 2025-11-24 11:39:19 +01:00
Wei Zhou dba889ea3e
UI: fix list of zones if zone has icon (#12083) 2025-11-24 11:10:43 +01:00
John Bampton 6dc259c7da
Rename and standardize issue templates to `.yml` (#12082) 2025-11-14 21:22:12 +01:00
John Bampton 39126a4339
Standardize and auto add license headers for Shell files with pre-commit (#12070)
* Add shebang to shell scripts
2025-11-14 14:23:41 +01:00
John Bampton aa18188d30
pre-commit: auto add license headers for all YAML files (#12069)
Fix and standardize one license header
2025-11-14 14:23:03 +01:00
John Bampton 4ed86a2627
pre-commit upgrade codespell; fix spelling; (#10144) 2025-11-14 14:17:10 +01:00
John Bampton 86ae1fee7f
Standardize and auto add license headers for SQL files with pre-commit (#12071) 2025-11-14 11:47:27 +01:00
Abhishek Kumar 21d844ba1c
ui: fix zone options for image instance deploy button (#12060)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-11-14 10:43:42 +01:00
John Bampton ac3b18095a
pre-commit use colored text in the CI for `pass / fail / skipped` (#11977) 2025-11-13 15:59:07 +05:30
John Bampton fff4cafdca
ui(locales): remove duplicates and fix typos (#11872) 2025-11-13 11:17:02 +01:00
John Bampton a5b455ff3a
pre-commit: auto add table of contents with `doctoc` (#11679)
https://github.com/thlorenz/doctoc?tab=readme-ov-file#usage-as-a-git-hook
https://github.com/thlorenz/doctoc/releases/tag/v2.2.0

Generates table of contents for Markdown files inside local git repository.

Links are compatible with anchors generated by github or other sites.

Added TOC to 3 Markdown files.

Never have to create a TOC again just run: `pre-commit run doctoc --all-files`

- CONTRIBUTING.md
- INSTALL.md
- README.md

So both Apache Airflow and Apache Sedona use `doctoc`:

eb4a8bc03c/.pre-commit-config.yaml (L32)
b0d86fda01/.pre-commit-config.yaml (L34)
2025-11-13 11:13:19 +01:00
John Bampton 8b034dc439
chore: rename workflow `linter.yml` to `pre-commit.yml` (#11647) 2025-11-13 15:22:49 +05:30
Abhishek Kumar dc8f465527
engine-schema: upgrade path for 4.23.0 (#12048)
Adds a 4.22.0 to 4.23.0 upgrade path.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-11-13 08:51:08 +01:00
dahn e90e31d386
add isPerson check to query for AD (#11843) 2025-11-12 16:09:28 +01:00
Madhukar Mishra f985a67f4d
Fixes:#7837: Add isolationMethods and vlan to TrafficTypeResponse (#8151)
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: dahn <daan@onecht.net>
2025-11-12 15:49:52 +01:00
dahn 5f9e131198
Svgs (#12051) 2025-11-12 14:31:36 +05:30
Abhisar Sinha 671d8ad704
Track volume usage data at a vm granularity as well (#11531)
Co-authored-by: Vishesh <8760112+vishesh92@users.noreply.github.com>
2025-11-12 09:32:01 +01:00
Erik Böck 23fb0e2ccb
Update GUI Kubernetes logo (#11895) 2025-11-11 18:13:00 +01:00
Davi Torres 40c8bc528d
Keeping consistency with other error messages. (#11649)
Co-authored-by: Davi Torres <dtorres@simnet.ca>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2025-11-11 15:33:07 +01:00
Pearl Dsilva 15439ede7d
UI: Update and reset domain level configuration (#11571) 2025-11-11 09:29:54 +01:00
Wei Zhou 50fe265017
Merge remote-tracking branch 'apache/4.20' into 4.22 2025-11-07 17:19:53 +01:00
Suresh Kumar Anaparti 2dd1e6d786
Enable UEFI on KVM hosts (by default), and configure with some default settings (#11740) 2025-11-07 14:54:02 +01:00
Phsm Qwerty 8c86f24261
enhancement: add instance info as Libvirt metadata (#11061) 2025-11-07 14:31:34 +01:00
Suresh Kumar Anaparti 9c0efb7072
DB setup: support db schema creation (with --schema-only) without force recreate option (#12004) 2025-11-07 09:37:11 +01:00
Suresh Kumar Anaparti b8ec941ec1
uefi property typo (#11929) 2025-11-07 09:31:11 +01:00
Pearl Dsilva a50de029bf
Add empty Provider value in Network/VPC Offering form (#11982) 2025-11-06 11:09:00 +01:00
Suresh Kumar Anaparti 81b2c38be9
Merge branch '4.22' 2025-11-06 14:41:59 +05:30
Suresh Kumar Anaparti ac8c200790
merge fix 2025-11-06 14:41:27 +05:30
Suresh Kumar Anaparti 5504b053e4
Merge branch '4.20' into 4.22 2025-11-06 14:37:38 +05:30
Harikrishna Patnala dbda673e1f Updating pom.xml version numbers for release 4.23.0.0-SNAPSHOT
Signed-off-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
2025-11-05 16:54:39 +05:30
Harikrishna Patnala e66926e6a4 Merge branch '4.22' 2025-11-05 16:52:20 +05:30
Harikrishna Patnala d160731b9f Updating pom.xml version numbers for release 4.22.1.0-SNAPSHOT
Signed-off-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
2025-11-05 16:07:07 +05:30
Wei Zhou 15c2e50338
UI: fix typo Upload SSL certificate (#11869) 2025-11-03 15:36:52 +01:00
Harikrishna Patnala 71f47d6130 Updating pom.xml version numbers for release 4.22.0.0
Signed-off-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
2025-10-30 19:23:56 +05:30
Abhisar Sinha 3d6cafe193
Handle null mountTimeout in RestoreBackupCommand (#11944) 2025-10-30 19:21:39 +05:30
Suresh Kumar Anaparti 15c61acedf
Fix the config 'powerflex.connect.on.demand' description (#11926) 2025-10-30 18:19:08 +05:30
Nicolas Vazquez 2dbc86abfa
Fix CKS cluster creation not honoring the CKS ISO arch (#11902)
* Fix CKS cluster creation not honouring the CKS ISO arch

* Fix arch type reference to choose right template

* Include template name on the CKS clusters response

---------

Co-authored-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
2025-10-27 10:58:46 +05:30
Nicolas Vazquez f52a27cce6
UI: Minor fix for extra params display for VMware to KVM migration (#11909) 2025-10-27 09:43:03 +05:30
nvazquez e20d57f33e
Fix checking resources before power state check of the VM 2025-10-26 18:53:51 -03:00
Nicolas Vazquez bfc4f60e1d
[VMware to KVM migration] Check source VM against the selected offering (#11908)
* [VMware to KVM migration] Check source VM against the selected offering

* Fix build
2025-10-26 16:45:26 +05:30
Harikrishna Patnala c2c1e11580 Merge branch '4.20' 2025-10-26 16:23:10 +05:30
John Bampton 941227ec8c
pre-commit add `chmod 644` manual hook for Markdown (#11651) 2025-10-24 16:05:52 +05:30
John Bampton e7b8326058
pre-commit auto add license for all Markdown files (#11870) 2025-10-24 16:04:22 +05:30
John Bampton 024f89dc7d
pre-commit: add oxipng a lossless PNG compression optimizer (#11065)
* pre-commit: add oxipng a lossless PNG compression optimizer

"Lossless compression is a data compression technique where the original data can be perfectly
reconstructed from the compressed data. In essence, no information is lost during compression
and decompression, making it ideal for situations where data integrity is critical"

https://en.wikipedia.org/wiki/Lossless_compression

https://github.com/oxipng/oxipng

https://github.com/oxipng/oxipng?tab=readme-ov-file#git-integration-via-pre-commit

Ran pre-commit here locally and it compressed the images on first run.

So we have less data for some images with the same quality.

Less data means less to download etc and saves bandwidth.

* Fix up from code review
2025-10-24 15:18:45 +05:30
Nicolas Vazquez 7ef5db2153
UI: Fix upgrade router template operation failure (#11901) 2025-10-24 13:38:06 +05:30
Abhisar Sinha a2fcbd608a
Avoid html escaping while saving vmsettings in backup_details (#11900) 2025-10-24 12:03:52 +05:30
Daan Hoogland b1851ba18a Merge release branch 4.20 to main
* 4.20:
  Fix OOB test failures in ci.yml github actions (#11887)
2025-10-23 11:58:09 +02:00
Nicolas Vazquez 4b74a99a57
Fix: NPE thrown on VMware to KVM migration tasks listing for removed VMs (#11892) 2025-10-23 10:40:17 +05:30
Nicolas Vazquez 2fcf96267d
UI: Fix duplicate memory values on InfoCard view conditions (#11896) 2025-10-23 10:30:17 +05:30
Daan Hoogland 8bbe253b00 Merge release branch 4.20 to main
* 4.20:
  Update CI workflow to use Ubuntu 24.04 (#11873)
2025-10-22 09:51:31 +02:00
Erik Böck f63118c011
Add erikbocks as a collaborator (#11863) 2025-10-20 10:27:34 +02:00
Abhishek Kumar 4cdcde2fe7
server: do not return extension path to non root admins (#11856)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-10-17 15:06:28 +05:30
Abhishek Kumar d8766418e0 extensions: custom action entity access 2025-10-17 14:08:28 +05:30
Nicolas Vazquez e7a55a766c
Fixes for Import VM Tasks listing (#11841)
* Fix import VM tasks pagination

* Fix UI for pagination and proper listing

* Fixes and improvements

* Polish UI

* Restore config.json

* Fix state on parameter description
2025-10-16 18:56:41 +05:30
Harikrishna Patnala 8b9f5fd8f9 Merge branch '4.20' 2025-10-16 13:39:40 +05:30
Pearl Dsilva 0e8b0b8e40
Allow counters to be created with same name, provider and source as a deleted one (#10223) 2025-10-15 13:06:36 +02:00
Pearl Dsilva f4b6a74a94
Add support for CSI driver in CKS (#11419)
* Support creation of PV(persistent volumes) in CloudStack projects

* add support for snapshot APIs for project role

* Add support to setup csi driver on k8s cluster creation

* fix deploy script

* update response

* fix table name

* fix linter

* show if csi driver is setup in cluster

* delete pvs whose reclaim policy is delete when cluster is destroyed

* update ref

* move changes to 4.22

* fix variables

* fix eof
2025-10-15 11:03:47 +05:30
Abhisar Sinha 046014b4c5
NAS BnR: Create Instance from Backup issues (#11754)
* add createCrossZoneInstnaceEnabled to BackupOfferingResponse

* show use IP Address from Backup button when orignal instance is expunged

* Fix NPE in takeBackup if the  vm template is deleted.

* Add since to Cross zone instance creation in BackupOfferingResponse.java

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Store and show Guest os type in the backup metadata

* show warning in create instance from backup form if guest os type is different

* show warning in create instance from backup form if guest os type is different

* backupvmexpunged -> isbackupvmexpunged

* review comments

* fix npe

* improve err msg

* err msg

---------

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-10-14 14:51:57 +05:30
Harikrishna c0a4392b05
Fix volume copy from primary to primary in simulator (#11836) 2025-10-14 14:01:44 +05:30
dahn f71d3a8e9f
update the developers guide link on the API page (#11832)
Co-authored-by: Daan Hoogland <dahn@apache.org>
2025-10-14 10:13:31 +02:00
Manoj Kumar 9e535e35d2
Support xz format for template registration (#11786) 2025-10-14 09:13:12 +02:00
Abhishek Kumar dfcbd2e977
server: consistent behaviour for list apis with project=-1 (#11767)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-10-14 09:06:53 +02:00
julien-vaz a574f7ac99
Add logs for host removal (#10423)
Co-authored-by: Julien Hervot de Mattos Vaz <julien.vaz@scclouds.com.br>
Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
2025-10-14 08:49:15 +02:00
CodeBleu c9ce6e305c
ui: Allow edit source CIDR on load balancer rule (#11766) 2025-10-14 08:30:28 +02:00
Pearl Dsilva 5e7ae227d3
UI: Prevent exceptions when network service provider that's disabled is viewed (#11413) 2025-10-14 08:24:59 +02:00
Abhishek Kumar 0ca63f36a5
api,server,ui: allow cleaning up external details for host and serviceoffering (#11548) 2025-10-13 16:21:43 +02:00
John Bampton 349feebd15
Standardize Markdown headings; enforce MD003 with markdownlint (#11688) 2025-10-13 17:37:32 +05:30
John Bampton cdb0604e7b
pre-commit: enforce mixed-line-ending for all files (#11667) 2025-10-13 16:26:15 +05:30
John Bampton e27528f8b2
Update GitHub Actions (#11664) 2025-10-13 16:25:58 +05:30
John Bampton 22ba8dd504
Remove misspelled file not found from rat excludes (#11665) 2025-10-13 16:23:09 +05:30
Vishesh 0ca267f516
Allow uploading of ISO for creating kubernetes supported versions (#9561) 2025-10-13 12:51:30 +02:00
Rohit Yadav 8464e46b53
PR #11778 with changes for main branch (#11781)
* systemvmtemplate: Bump Debian version to 12.12.0

* systemvmtemplate: bump version to 4.22

This bumps the systemvmtemplate version to 4.22 for use with the
main/4.22 branch.

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

---------

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2025-10-13 15:09:25 +05:30
Pearl Dsilva 0e93ae3bdf
UI: Add validator for CIDR being passed (#11465) 2025-10-13 11:18:32 +02:00
John Bampton a5a934dac1
pre-commit: add hooks `check-illegal-windows-names` and `file-contents-sorter` (#11662) 2025-10-13 13:59:42 +05:30
Layon 136ea3eafa
UI: Removal of UI blockage to access the `changeOfferingForVolume` API (#10135) 2025-10-13 10:27:36 +02:00
Rohit Yadav 1e23d6bc20
server: enable KVM volume and VM snapshot by default (#11446)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2025-10-13 09:53:11 +02:00
Wei Zhou 162c45f8fa
api/server: list networks by name (#11470)
* api/server: list networks by name

* Update api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java
2025-10-13 12:39:13 +05:30
Vishesh 0b9afe77ca
Enforce distinct hostnames network (#10212)
* Check for unique hostnames for all networks in the vpc

* Address comments
2025-10-13 12:38:31 +05:30
John Bampton cc6ee906d5
Markdown: add documentation on pre-commit usage (#11680) 2025-10-13 12:11:55 +05:30
Nicolas Vazquez b106d6e190
VMware to KVM Migrations improvements (#11594)
* Add source VM name on virt-v2v migration log entries

* Improve the feedback by displaying the running importing tasks

* Add source VM name prefix on more conversion logs

* Improve listing and also list completed tasks

* Pass extra parameters to virt-v2v if administrator allows via global setting

* Add Force converting directly to storage pool option

* Refactor based on review comments

* Add properties for env vars for the instance conversion

* Add separate component for Import VM Tasks

* applying copilot suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix importing unmanaged instances due to incorrect internal name

* Add VM prefix on each log operation for conversion

* Log the original VM name instead of the cloned VM in case of cloning

* Allow searching storage pool by UUID after conversion to support SharedMountPoint

* Fix search pools logic

* Improve UI and add checks for force convert to pool parameter

* Support Local storage when forceconverttopool is set to true

* Add config key to for allowed extra params and add validation

* Fix params lists

* Fix compile error

* Remove extra stubbings

* Fix extra params execution

---------

Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-10-10 20:00:29 -03:00
Harikrishna b99a03092f
Added Extension for MaaS integration in CloudStack (#11613)
* Adding extension support for Baremetal MaaS

* Update engine/schema/src/main/resources/META-INF/db/schema-42100to42200.sql

---------

Co-authored-by: Rohit Yadav <rohityadav89@gmail.com>
2025-10-10 14:57:30 +05:30
Suresh Kumar Anaparti df49c4f14b
UI: Move Backup Repository to Infrastructure (from Configuration) (#11738)
* UI: Move Backup Repository to Infrastructure (from Configuration)

* Updated nas doc help link
2025-10-10 13:25:05 +05:30
Abhishek Kumar 67250d99d4
ui: fix add host form state on submit (#11815) 2025-10-10 13:09:25 +05:30
Suresh Kumar Anaparti 2b1f0bbbdb
UI: Fix for cluster addition in VMware (#11812) 2025-10-10 12:35:41 +05:30
Pearl Dsilva 973819dad6
API: Add support to list all snapshot policies & backup schedules (#11587)
* API: Add support to list all snapshot policies & backup schedules

* Add support for backup policy listing without tying it to the vmid

* add tests for snapshot policy listing

* update tests for listbackupschedules

* remove trailing spaces and fix lint failure

* Add upgrade test

* remove unused import

* add create policy - snap/backup in the list view with resource (volume/vm) selection

* add translations

* refresh parent list

* remove unnecessary alert info

* fix checks for UI backup schedule list view

* fix checks for UI backup schedule list view

* add back access checks

* add since param

* fix failing test

* update snapshot policy and backup schedule ownership when VM is moved

* fix issue with showing vm selection

* fix unit test failure

* Update list snappolicy & backup schedule logic to list only those that belong to a proj or for root admin those that belong to it, unless listall & projid is passed

* fix test

* support snap / backup policy search using keyword

* fix tests
2025-10-09 17:22:17 +05:30
Suresh Kumar Anaparti f67b738eb3
Migrate volume improvements, to bypass secondary storage when copy volume between pools is allowed directly (#11625)
* Migrate volume improvements, to bypass secondary storage when copy volume between pools is allowed directly

* Bypass secondary storage for copy volume between zone-wide pools and
- local storage on host in the same zone
- cluser-wide pools in the same zone

* Bypass secondary storage for volumes on ceph/rdb pool when the scope permits

* Fix dest disk format while migrating volume from ceph/rbd to nfs, and some code improvements

* unit tests

* Update suitable disk offering(s) for volume(s) after migrate VM with volumes when change in pool type (shared or local)

Currently, Migrate VM with volume(s) bypasses the service and disk offerings of the volumes, as the target pools for migration are specified,
which ignores the offerings. Offering change is required when pool type (shared or local) is changed, mainly
- when volume on shared pool is migrated to local pool
- when volume on local pool is migrated to shared pool

* Update with proper message while migrate volume when target pool and offering type mismatches (both are not shared/local)

* Consider host scope first during endpoint selection while copying between primary storages

* Update disk offering count (for listDiskOfferings api) while removing offerings with tags mismatch with storage tags
2025-10-09 16:00:46 +05:30
Abhishek Kumar a6ef24d167
server: consistent domainpath in api responses (#11589)
* server: consistent domainpath in api responses

Currently, some APIs return domainpath as 'ROOT/domain1/domain2' while
other return it as '/domain1/domain2'. This PR makes the response
consistent like "ROOT/domain1/domain2"

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* more changes

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-10-09 13:06:28 +05:30
Wei Zhou 6089c161a6
Merge remote-tracking branch 'apache/4.20' 2025-10-08 15:40:33 +02:00
Henrique Sato cc3170577c
Add `Hypervisor default` as cache mode for disk offerings (#10282)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2025-10-08 13:39:28 +02:00
Abhishek Kumar a15fbd9bcc
refactor: remove use of term entry-point from extensions code base (#11488)
Addresses #11483

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-10-08 15:42:43 +05:30
Suresh Kumar Anaparti 09b63bc2e8
Storage pool response improvements (#10740)
* Return details of the storage pool in the response including url, and update capacityBytes and capacityIops if applicable while creating storage pool

* Added capacitybytes parameter to the storage pool response in sync with the capacityiops response parameter and createStoragePool cmd request parameter (existing disksizetotal parameter in the storage pool response can be deprecated)

* Don't keep url in details

* Persist the capacityBytes and capacityIops in the storage_pool_details table while creating storage pool as well, for consistency - as these are updated with during update storage pool

* rebase with main fixes
2025-10-08 11:20:37 +05:30
Vishesh d2615bb142
Add support for providing userdata to system VMs (#11654)
This PR adds support for specifying user data (cloud-init) for system VMs via Zone Scoped global settings. This allows the operators to customize the System VMs and setup monitoring, logging or execute any custom commands.

We set the user data from the global setting in /var/cache/cloud/cmdline, and use the NoCloud datasource to process user data. cloud-init service is still disabled in the system VMs and it's executed as part of the cloud-postinit service which executes the postinit.sh script.

Added global settings:
systemvm.userdata.enabled - Disabled by default. Needs to be enabled to utilize the feature.
console.proxy.vm.userdata - UUID of the User data to be used for Console Proxy
secstorage.vm.userdata - UUID of the User data to be used for Secondary Storage VM
virtual.router.userdata - UUID of the User data to be used for Virtual Routers
2025-10-08 10:44:26 +05:30
Wei Zhou 858663fcf7
UI: fix missing comma at end of line 2025-10-07 16:55:04 +02:00
Daan Hoogland 5f63e8493c Merge branch '4.20' 2025-10-07 15:12:53 +02:00
Manoj Kumar 9bcd98876d
Make kvm domain persistent when unmanaged from CS (#11541)
CS creates transient KVM domain.xml. When instance is unmanaged from CS, explicit dump of domain has to be taken to manage is outside of CS.

With this PR

    domainXML gets backed up and becomes persistent for further management of Instance.
    Stopped instance also can be unmanaged, last host for instance is considered for defining domain
    hostid param is supported in unmanageVirtualMachine API for KVM hypervisor and for stopped Instances
    hostid field in response of unmanageVirtualMachine, representing host used for unmanage operation
    Disable unmanaging instance with config drive, can unmanage from API using forced=true param for KVM
2025-10-07 10:32:33 +05:30
Suresh Kumar Anaparti b7a11cb203
NAS backup provider: Support restore from backup to volumes on Ceph storage pool(s), and take backup for stopped instances with volumes on Ceph storage pool(s) (#11684)
Co-authored-by: Abhisar Sinha <63767682+abh1sar@users.noreply.github.com>
2025-10-06 09:13:28 +02:00
Erik Böck 5a8a1e27e1
Fixed and enhanced vlan field validation in the UI (#10983) 2025-10-03 16:12:36 +05:30
Abhishek Kumar b09f3e8ff7
ui: fix overflow for value in DetailInput (#11771)
In DetailInput component when a long value is used, it overflows on some
browsers.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-10-03 11:20:22 +05:30
Abhisar Sinha 1efa46cb4d
fix removeUsage for backups (#11522) 2025-10-02 17:15:54 +05:30
Pearl Dsilva cd12fa5848
Add UUID field for LDAP configuration (#11462)
* Add UUID field for LDAP configuration

* move db changes to the lastest schema file

* Add ID param to list ldapConf API & delete ldapConf API

* fix ui test

* fix 1 ui test

* fix test

* fix api description

---------

Co-authored-by: dahn <daan@onecht.net>
2025-10-01 14:43:22 +02:00
Abhisar Sinha 7dd0d6e937
add ConfigDrive to datasource_list in SharedfsVM (#11726) 2025-10-01 18:00:44 +05:30
Wei Zhou 2a802a3143
Extensions: use home directory of cloud user instead of /var/lib/cloudstack/management/ (#11732) 2025-10-01 08:49:58 +02:00
dk-blackfuel d60f455b00
Fix detection of Mi3xx GPUs (#11715) 2025-09-30 18:34:58 +05:30
Vishesh 3159fa7d84
noVNC: make show dot configurable (#11741) 2025-09-29 16:18:42 +02:00
Wei Zhou 9cc88b8dcc
CKS: fix control plane endpoint IP (#11720) 2025-09-29 09:10:56 +02:00
Abhishek Kumar 2c1aad4db8
Merge remote-tracking branch 'apache/4.20' 2025-09-27 09:00:45 +05:30
Abhishek Kumar 928972f767
extension/proxmox: add console access for instances (#11601)
This PR introduces console access support for instances deployed using Orchestrator Extensions, available via either VNC or a direct URL.

- CloudStack queries the extension using the getconsole action.
- For VNC-based access, the extension must return host/port/ticket details. CloudStack then forwards these to the Console Proxy VM (CPVM) in the instance’s zone. It is assumed that the CPVM can reach the specified host and port.
- For direct URL access, the extension returns a console URL with the protocol set to `direct`. The URL is then provided directly to the user.
- The built-in Proxmox Orchestrator Extension now supports console access via VNC. The extension calls the Proxmox API to fetch console details and returns them in the required format.

Also, adds changes to send caller details to the extension payload.
```
# cat /var/lib/cloudstack/management/extensions/Proxmox/02b650f6-bb98-49cb-8cac-82b7a78f43a2.json | jq
{
  "caller": {
    "roleid": "6b86674b-7e61-11f0-ba77-1e00c8000158",
    "rolename": "Root Admin",
    "name": "admin",
    "roletype": "Admin",
    "id": "93567ed9-7e61-11f0-ba77-1e00c8000158",
    "type": "ADMIN"
  },
  "virtualmachineid": "126f4562-1f0f-4313-875e-6150cabeb72f",
  ...
```

Documentation PR: https://github.com/apache/cloudstack-documentation/pull/560

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-09-27 08:54:27 +05:30
Vishesh ec533cd24d
Add support EL10 (#11546) 2025-09-25 15:37:45 +05:30
Abhisar Sinha 23c9e83047
Create Instance from backup on another Zone (DRaaS use case) (#11560)
* draas initial changes

* Added option to enable disaster recovery on a backup respository. Added UpdateBackupRepositoryCmd api.

* Added timeout for mount operation in backup restore configurable via global setting

* Addressed review comments

* fix for simulator test failures

* Added UT for coverage

* Fix create instance from backup ui for other providers

* Added events to add/update backup repository

* Fix race in fetchZones

* One more fix in fetchZones in DeployVMFromBackup.vue

* Fix zone selection in createNetwork via Create Instance from backup form.

* Allow template/iso selection in create instance from backup ui

* rename draasenabled to crosszoneinstancecreation

* Added Cross-zone instance creation in test_backup_recovery_nas.py

* Added UT in BackupManagerTest and UserVmManagerImplTest

* Integration test added for Cross-zone instance creation in test_backup_recovery_nas.py
2025-09-25 13:28:29 +05:30
Abhishek Kumar b0c7719006
ui: do not show admin only options to users while registering template (#11702) 2025-09-24 17:42:28 +02:00
Wei Zhou e78b5cc3cc
Merge remote-tracking branch 'apache/4.20' 2025-09-24 09:27:08 +02:00
Abhishek Kumar 4884f52c90
ui: allow provisioning backups during instance deploy (#11612)
* ui: allow assigning backup offring during instance deploy

Add backup offering selection to Deploy VM wizard and assign selected backup offering to the VM after successful deployment. This enables users to choose a backup offering during VM creation, and the VM is automatically associated with the selected offering post-deployment.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* changes for schedules

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update ui/public/locales/pt_BR.json

* Update ui/src/views/compute/wizard/DeployInstanceBackupSelection.vue

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* address review

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

* allow only one schdeule per interval type

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* show message same internaltype schedule

* show backup step only when zone has offering

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-23 14:51:42 +05:30
Rohit Yadav d9abc078cf
ui: fix build on latest Ubuntu and macOS (#11259)
* ui: fix build on latest Ubuntu and macOS

This fixes UI build, so it can build against nodejs 20.x/LTS.

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

* Update ui/package.json

---------

Signed-off-by: Rohit Yadav <rohit@yadav.cloud>
2025-09-23 09:37:43 +05:30
Wei Zhou 22bf8fd5d1
Merge remote-tracking branch 'apache/4.20' 2025-09-22 16:31:01 +02:00
Wei Zhou 69998f7c40
api,server: support templatetype when upload template from local (#11682) 2025-09-22 10:46:43 +02:00
dahn aca8732102
[router] make a distinction between fatal errors, warnings and unknown as healthcheck result (#10710)
* [routers] distiction between fatal failure and warning or unknown on healthchecks

* UI status for router health checks

* status from scripts varied

* automation signalled errors

* revert removal of update sql

* upgradeversion

* move config item and further cleanup

* handling services better

* backwards compatible response

---------

Co-authored-by: Daan Hoogland <dahn@apache.org>
2025-09-22 11:39:05 +05:30
Harikrishna 3ef2556900
Fix scaleKubernetesCluster API (#11652)
* Fix scaleKubernetesCluster

* Added more state transitions
2025-09-20 17:57:45 +05:30
vanzan01 e6c7a71d40
Add yamllint pre-commit hook for YAML file standardization (#11017)
* Add yamllint pre-commit hook for YAML file standardization

Add yamllint hook to .pre-commit-config.yaml to standardize YAML files
across the project. Created .yamllint.yml configuration with relaxed
rules to accommodate existing files. Fixed colon spacing in .asf.yaml
to pass yamllint checks.

Closes #10974

Signed-off-by: vanzan01 <vanzan.1250@gmail.com>

* Add extra eol to .yamllint.yml

Address review comment from DaanHoogland

Signed-off-by: vanzan01 <vanzan.1250@gmail.com>

* Move .yamllint.yml to .github/linters/ and improve file pattern

- Move .yamllint.yml to .github/linters/ directory for better organization
- Update pre-commit config to point to new location
- Change file pattern to \.ya?ml$ as suggested

Address review feedback from jbampton

Signed-off-by: vanzan01 <vanzan.1250@gmail.com>

* Update .pre-commit-config.yaml

Co-authored-by: John Bampton <jbampton@users.noreply.github.com>

* Make yamllint more forgiving and exclude only k8s templates

- Remove extensive file exclusions, keep only k8s templates
- Increase line length limit to 400 chars (GitHub Actions friendly)
- Allow flexible colon spacing (max-spaces-after: -1)
- Disable document-start requirement

This provides linting value while handling infrastructure patterns.

Signed-off-by: vanzan01 <vanzan.1250@gmail.com>

* Update .pre-commit-config.yaml

Co-authored-by: John Bampton <jbampton@users.noreply.github.com>

---------

Signed-off-by: vanzan01 <vanzan.1250@gmail.com>
Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
2025-09-20 03:16:00 +10:00
julien-vaz a466750d3b
Add cleanup for tiers dropdown on assignVIrtualMachine API form (#11464)
Co-authored-by: Julien Hervot de Mattos Vaz <julien.vaz@scclouds.com.br>
2025-09-19 15:46:20 +02:00
John Bampton a452dc6543
chore(markdown): use https on links (#11676) 2025-09-19 15:20:40 +02:00
Pearl Dsilva 8eb6ddd920
Fix inactive VPCs deletion (#11618)
Co-authored-by: Nicolas Vazquez <nicovazquez90@gmail.com>
2025-09-18 08:25:48 -03:00
John Bampton 0526ec0d82
PULL_REQUEST_TEMPLATE standardize case of types of changes (#11663) 2025-09-18 10:01:24 +02:00
John Bampton 0108ffd1b0
java: fix one typo in many files (#11284) 2025-09-17 22:05:38 +05:30
John Bampton 6eb27da5e4
Fix spelling in Java and Python files; update the ignored words list `codespell.txt` (#11285)
Co-authored-by: dahn <daan.hoogland@gmail.com>
2025-09-17 17:24:04 +02:00
John Bampton 33cfedee46
pre-commit add hook `check-shebang-scripts-are-executable` for Shell (#10150) 2025-09-17 14:22:28 +02:00
John Bampton f9a72de500
misc: pre-commit auto remove unneeded trailing whitespace (#11289) 2025-09-17 14:21:56 +02:00
Pearl Dsilva e7015cbc4c
Move console proxy related global settings to Zone level (#11415) 2025-09-17 14:06:00 +02:00
CodeBleu 273ae03274
Allow updating of Load Balancer source CIDR list (#11568) 2025-09-17 13:49:46 +02:00
John Bampton 57309314a1
pre-commit: clean up Python flake8 excludes with black (#9793) 2025-09-17 12:40:56 +02:00
John Bampton 0d9c5065de
Add CodeQL Analysis for GitHub Actions (#11300) 2025-09-17 12:33:08 +02:00
vishesh92 ada750e391
Merge branch '4.20' 2025-09-17 14:26:06 +05:30
Pearl Dsilva 96ccd7e6c5
Filter netris vNets only by VPC ID as filter by site isn't working as expected on netris end (#11617) 2025-09-16 09:13:10 -03:00
Nicolas Vazquez 96cabf7e43
[KVM] Allow passing the OS type machine for KVM XML domains through VM setting (#11569)
* [KVM] Allow passing OS type machine to XML domains
2025-09-16 15:49:20 +05:30
Pearl Dsilva 23a53e213e
Add LB service to Custom Netris VPC/Network offerings (#11410)
* Add LB service to Custom VPC/Network offerings

* fix offering

* externalize common checks to a utility file

* remove trailing spaces
2025-09-16 09:40:33 +05:30
John Bampton 9317a46513
Add all workflow buttons to README (#11406) 2025-09-15 09:38:47 +02:00
Wei Zhou 70a4503ea1
Merge remote-tracking branch 'apache/4.20' 2025-09-11 14:04:52 +02:00
Wei Zhou b46e29dc67
Improvement: SSL offloading with Virtual Router (#11468)
* SSL offloading with Virtual Router

* PR11468: fix pre-commit errors

* PR11468: api->getAPI/postAPI in UI

* SSL: add smoke tests for VPC in user project

* PR11468: address Daan's comments

* Fix test/integration/smoke/test_ssl_offloading.py

* SSL: remove ssl certificates when clean up account

* SSL offloading: add unit tests

* SSL offloading: UI fixes part 1

* SSL offloading: UI changes part 2

* SSL offloading: add more unit tests

* SSL offloading: more unit tests 3

* SSL offloading: wrong check

* SSL offloading: more and more unit tests

* SSL offloading: add testUpdateLoadBalancerRule5
2025-09-11 16:37:18 +05:30
Wei Zhou 8089d32740
Merge remote-tracking branch 'apache/4.20' 2025-09-09 19:50:22 +02:00
Abhisar Sinha 3d6ec29c9b
Don't show backup in list_capacity for dummy plugin or if backup_framework is disabled (#11485)
* Don't show backup storage in list_capacity for dummy plugin or if backup_framework is disabled

* Fix the tile to full size

---------

Co-authored-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
2025-09-03 15:50:46 +05:30
Wei Zhou 66a584624f
Update md5sum to sha512sum (#11134)
* Update md5sum to sha512sum

* Move SQL to schema-42100to42200.sql
2025-09-03 11:12:43 +02:00
Abhishek Kumar 3ddd8023d0
ui: fix extension path with name having special characters (#11489)
Fixes #11481

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-09-02 18:19:01 +05:30
dahn 76ef8d31f8
make server threads configurable with server.properties file (#11540)
Co-authored-by: Ahmed Awlaqi <ahmed.awlaqi@sue.nl>
Co-authored-by: Daan Hoogland <dahn@apache.org>
2025-09-02 08:56:15 +02:00
Wei Zhou abe41add86
Merge remote-tracking branch 'apache/4.20' 2025-09-02 08:24:37 +02:00
Wei Zhou 574ed7857b
.github: Update to JDK 17 in ci.yml and build.yml (#11030)
* .github: Update to JDK 17 in build.yml

* .github: update JDK in ci.yml

---------

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-09-01 10:14:09 +02:00
Wei Zhou ca0c3530ad
utils: add UuidUtils.nameUUIDFromBytes (#11136)
* utils: add UuidUtils.nameUUIDFromBytes

* Fix PR 13922
2025-09-01 08:10:31 +02:00
Wei Zhou ba42d25162
packaging: add pre-check.sh (#11135) 2025-09-01 08:08:43 +02:00
Davi Torres 9184170b01
Remove Domain/IP from Password Reset Link to custom Global Setting (#11379)
Co-authored-by: Davi Torres <dtorres@simnet.ca>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-08-31 11:22:33 +02:00
Wei Zhou 3c4f458819
Merge remote-tracking branch 'apache/4.20' 2025-08-30 18:42:10 +02:00
Wei Zhou 889fc62b60
schema: Add upgrade path from 4.21.0.0 to 4.22.0.0 (#11469)
* Add upgrade path from 4.21.0.0 to 4.22.0.0
* Optimize DbUpgrade files
2025-08-30 16:07:50 +05:30
Suresh Kumar Anaparti 2eb80e0361
Merge branch '4.20' 2025-08-29 15:36:16 +05:30
Oleg Chuev 👋 2105794f61
UI: Hide User Card from config.userCard.enabled option (#10545)
Co-authored-by: OlegChuev <o.chuev@mobidev.biz>
2025-08-29 11:30:25 +02:00
Orsiris de Jong cbc614d8e3
Add logs to keystore-setup and fix password regex (#10723) 2025-08-29 14:14:04 +05:30
Rohit Yadav 5da7d2d01e
scripts: fix external provision to use correct power state & hyperv powersync (#11504)
* scripts: fix external provision to use correct power state

The valid states are poweron and poweroff.

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

* strip string while processing powerstate for HyperV

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

* ignore warning that spills over to exten output string

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

---------

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2025-08-29 12:09:23 +05:30
Wei Zhou e5e902a320
tools: fix 4.22.0.0-SNAPSHOT 2025-08-28 11:10:25 +02:00
Suresh Kumar Anaparti 1033be4b31
Updating pom.xml version numbers for release 4.22.0.0-SNAPSHOT
Signed-off-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-08-28 12:00:42 +05:30
Suresh Kumar Anaparti f9513b47bf
Updating pom.xml version numbers for release 4.21.0.0
Signed-off-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-08-22 11:42:37 +05:30
slavkap 1272b13087
Fix of create a template from a StorPool snapshot on another zone (#11490)
* Fix of create template from snapshot on another zone

When a snapshot has a copy on StorPool primary storage in another zone, but the original snapshot resides on secondary storage, creating a template from the copied snapshot results in the template being created in the first zone.
If the snapshot.backup.to.secondary setting is disabled, and a user creates a volume or template from a snapshot, the snapshot is temporarily backed up to secondary storage during the operation. After the operation, this backup should be deleted. However, the snapshot currently remains on both primary and secondary storage.

* update snapshot info depending on the data store role
2025-08-22 00:53:55 +05:30
Suresh Kumar Anaparti e0bc8c3b1a
Merge branch '4.20' 2025-08-21 18:35:34 +05:30
João Jandre f2d635683b
Update error message when no snapshot strategy is found while creating snapshot (#11455) 2025-08-18 14:14:20 +05:30
Suresh Kumar Anaparti 5a90da3276
Fix for PowerFlex MDM configuration on host while preparing the SDC connection (#11458) 2025-08-18 11:57:54 +05:30
Suresh Kumar Anaparti f671461d4c
Fix for create template from snapshot (for snapshots on primary storage and storage doesn't support create snapshot to template directly) (#11452)
* Fix for create template from snapshot

* code improvements, for create volume from snapshot
2025-08-15 22:17:03 +05:30
Bernardo De Marco Gonçalves ba2d70ab21
[KVM] CPU Features for System VMs (#10964)
* CPU features for System VMs

* Apply guest.cpu.features for System VMs
2025-08-15 20:02:50 +05:30
Suresh Kumar Anaparti 2c34f5e495
Merge branch '4.20' 2025-08-15 19:54:41 +05:30
Wei Zhou 93d6ff3a7d
Proxmox: fix restore snapshot with memory (#11450) 2025-08-15 19:32:57 +05:30
Wei Zhou 03da8cbd3e
server: fix conserve_mode of DefaultIsolatedNetworkOfferingForVpcNetworks (#11133)
* server: fix conserve_mode of DefaultIsolatedNetworkOfferingForVpcNetworks

* test: update test_network_acl.py to test conserve mode

* Update test/integration/smoke/test_network_acl.py

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-08-15 17:58:28 +05:30
Harikrishna 0b381d4270
Exclude External hypervisor type during upgrade for System VM template checks (#11435)
* Exclude External hypervisor type during upgrade for System VM template checks
2025-08-15 16:28:56 +05:30
Vishesh 2c493d1933
Add support for nvidia vGPU support with vendor specific framework (#11432) 2025-08-15 15:54:11 +05:30
Abhisar Sinha 9fd2b90b80
Fix ConfigurationVO load exception after schema change (#10485) 2025-08-11 21:20:22 +05:30
Suresh Kumar Anaparti 96728c5a17
Merge branch '4.20' 2025-08-11 20:44:26 +05:30
Ruben Bosch e57e8cf418
Network rate must be multiplied by 125 not 128 (#10645)
* Network rate must be multiplied by 125 not 128

In a libvirt domain xml when nw_rate=5000 the kilobytes per second
configured in the interface is 640000 which is 5.12 Gbit/s. Which is
more than the configured network rate of 5Gbit/s. So instead multiply by
125.

* Apply suggestions from code review

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-08-11 20:11:36 +05:30
Vishesh 1994511f0c
noVNC: Show a dot cursor when the cursor is not visible (#11418) 2025-08-11 17:59:26 +05:30
Suresh Kumar Anaparti 99919fda7f
Merge branch '4.20' 2025-08-11 16:44:27 +05:30
Nicolas Vazquez 53b026487f
UI: Fix duplicate edit zone button on Basic zones (#11427) 2025-08-11 16:40:44 +05:30
Vishesh 26218b093e
Fix edit of compute offering in UI (#11417) 2025-08-11 16:23:59 +05:30
Nicolas Vazquez 7d59bfe2b5
[UI] Fix zone creation wizard stuck on configuring public traffic (#11404)
* [UI] Fix zone wizard creation stuck on configuring public traffic
2025-08-07 18:18:39 +05:30
slavkap dc5e475bd2
Fix of deployment VM from a copied snapshot in another zone (#11351)
* Fix of deploy VM with a snapshot that is copied to another zone
* Fix of creating StorPool volume from a snapshot if the size in the
offering is bigger than the snapshot size
2025-08-07 18:17:57 +05:30
Suresh Kumar Anaparti ae95be3702
Merge branch '4.20' 2025-08-07 18:16:19 +05:30
dahn fe8f3c8eeb
get forward header for proxies and apply it in Jetty (#11386)
* get forward header and apply it fro proxies

Co-authored-by: Daan Hoogland <dahn@apache.org>
2025-08-07 18:15:16 +05:30
Abhishek Kumar f020b5b5df
cleanup: remove com.cloud.user.MockAccountManagerImpl (#11392)
Replaces com.cloud.user.MockAccountManagerImpl with Mockito.mock(AccountManager.class)

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-08-06 13:38:50 +02:00
Suresh Kumar Anaparti 4c3f29de1e
Agent manager connection handling improvements (#11376)
* Agent manager connection handling improvements

* Fix to send LB check interval in ready command
2025-08-05 15:07:02 +05:30
Erik Böck d7b7bd53ad
Fix infrastructure leak on exception while attaching/detaching volumes in VMware (#10860)
* Handled exception separately to prevent infrastructure data leak
2025-08-04 19:35:54 +05:30
Suresh Kumar Anaparti 15740136dc
Merge branch '4.20' 2025-08-04 18:13:29 +05:30
Abhisar Sinha 80f837b5e7
remove volume size check in restoreBackupToVM (#11384) 2025-08-04 18:08:48 +05:30
Suresh Kumar Anaparti d601c176f1
Merge branch '4.20' 2025-08-04 17:50:04 +05:30
Suresh Kumar Anaparti ca8ce8c885
Merge branch '4.20' 2025-08-04 16:44:40 +05:30
dahn 9712b4d322
custom AccessLogger (#9733)
* custom AccessLogger

Co-authored-by: Daan Hoogland <dahn@apache.org>
2025-08-04 16:36:08 +05:30
slavkap e5f61164b3
Support of snapshot copy to primary storage in different zones. (#9478)
* Support of snapshot copy to different StorPool primary storage between zones
2025-08-04 16:35:16 +05:30
shrikantjoshi-hpe 5cac4f6c44
added online/offline copy method for Primera storage adapter (#11298) 2025-08-03 12:31:37 +05:30
João Jandre 4a4b5a5e5f
Improve volume backup restoration log (#11181) 2025-08-03 12:29:54 +05:30
jeanvetorello ccd86d96d9
ceph: fix SignatureDoesNotMatch by using correct secret key (#11115)
Ensure bucket.getSecretKey() is used when building the S3 client.
Previously, only getAccessKey() was passed for both key and secret,
causing V4 signature validation failures during operations such as
bucket creation and policy updates.

Co-authored-by: Jean Vetorello <jean@paneas.com>
2025-08-03 12:27:09 +05:30
Suresh Kumar Anaparti a84c4cb351
Merge branch '4.20' 2025-08-02 22:56:37 +05:30
Pearl Dsilva db63d2428b
Netris: Fix Netris provider parameter name and response (#11377)
* Fix Netris url param name and allow cidr size for routed mode vpcs

* rename response parameter name
2025-08-02 22:33:43 +05:30
Bernardo De Marco Gonçalves 9de77e1cc1
API to list console sessions (#11016)
* create API to list console sessions
2025-08-01 20:28:33 +05:30
Suresh Kumar Anaparti 5c1bf4a4ce
Merge branch '4.20' 2025-08-01 18:00:45 +05:30
Vishesh d4229d3105
Fix failing simulator vgpu test (#11374) 2025-08-01 17:45:17 +05:30
Abhishek Kumar b2ce1fb9c3
ui: fix initial pagination for images in deploy forms (#11349)
Regression from #10773

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-08-01 17:44:01 +05:30
Abhishek Kumar 44f80648a9
agent: increase timeout for host arch retrieval (#11254)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-08-01 17:42:08 +05:30
Abhishek Kumar b479d37b87
ui: fix api type in InfiniteScrollSelect (#11370)
Earlier it was always using HTTP POST. Ideally it will always be some
list API.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-08-01 17:39:50 +05:30
Abhishek Kumar a60c8cab14
api,server,ui: allow listing events by state (#11355)
* api,server,ui: allow listing events by state

This change allows listing events by a particular state - Created, Scheduled, Started, Completed.
A new parameter - state has been added to the listEvents API and corresponding changes have been added in the UI.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update api/src/main/java/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-07-31 19:22:15 +05:30
slavkap adccdf2c7b
UI support for deploy a VM from volume/snapshot (#11164)
* UI support for deploy  a virtual machine with existing volume or a disk snapshot
2025-07-31 19:00:11 +05:30
slavkap 5aa15187b6
Refactoring StorPool tests (#11107)
* Refactor StorPool  smoke tests

* Marvin confing template for StorPool tests
2025-07-31 18:34:35 +05:30
Vishesh bcd738caa6
Fix GPU discovery script to make it run with mdev for SR-IOV enabled devices (#11340) 2025-07-31 18:29:35 +05:30
Abhisar Sinha e805e45342
Show chain size in snapshot response for incremental snapshots (#11313) 2025-07-31 14:52:48 +02:00
Pearl Dsilva 9f5828a027
UI: Fix cpu & memory details on list view for unmanaged k8s clusters (CAPC) (#11353) 2025-07-31 18:14:55 +05:30
Suresh Kumar Anaparti 8ac8a22163
Merge branch '4.20' 2025-07-31 18:04:17 +05:30
João Jandre 5ea1ada59a
Allow full clone volumes with thin provisioning in KVM (#11177)
It adds a configuration called create.full.clone to the agent.properties file. When set to true, all QCOW2 volumes created will be full-clone. If false (default), the current behavior remains, where only FAT and SPARSE volumes are full-clone and THIN volumes are linked-clone.
2025-07-31 16:12:17 +05:30
levindecaro f62b85dffe
fix fsvm-init.yml to detect virtio-scsi in kvm (#11070)
* fix fsvm-init.yml to detect virtio-scsi in kvm

* Update fsvm-init.yml to handle universal block device case.
2025-07-31 16:06:54 +05:30
Abhisar Sinha a87c5c2b3a
Create new Instance from VM backup (#10140)
This feature adds the ability to create a new instance from a VM backup for dummy, NAS and Veeam backup providers. It works even if the original instance used to create the backup was expunged or unmanaged. There are two parts to this functionality:
Saving all configuration details that the VM had at the time of taking the backup. And using them to create an instance from backup.
Enabling a user to expunge/unmanage an instance that has backups.
2025-07-31 15:47:22 +05:30
Suresh Kumar Anaparti b9febe4b4f
Merge branch '4.20' 2025-07-31 15:23:45 +05:30
Nico 6b9615b2f9
Selected type on update traffic type is based on chosen type in traffic types tab (#10902)
Co-authored-by: Nicole Schmidt <nicole.schmidt@scclouds.com.br>
2025-07-31 15:21:19 +05:30
Suresh Kumar Anaparti f58372e97b
[UI] Use GET request method for list API calls (#11354)
* [UI] Use GET request method for list API calls

* Updated UI unit tests
2025-07-31 15:09:12 +05:30
Suresh Kumar Anaparti 1f1e38f3a8
Support to list templates in ready state (new API parameter 'isready', similar to list ISOs) (#11343)
* Support to list templates in ready state (new API parameter 'isready', similar to list ISOs), and UI to display Templates/ISOs in ready state wherever applicable
2025-07-31 10:08:35 +05:30
Suresh Kumar Anaparti 712492230a
Shutdown MS maintenance jobs when finished (#11330) 2025-07-31 10:00:29 +05:30
Suresh Kumar Anaparti 70468a6258
Merge branch '4.20' 2025-07-30 18:30:07 +05:30
Bernardo De Marco Gonçalves f73cb5621d
Refactoring retention of backup schedules (#11223)
* refactor backup schedule retention workflows

Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2025-07-30 18:12:04 +05:30
Suresh Kumar Anaparti 76cfcb48fb
Merge branch '4.20' 2025-07-30 11:21:12 +05:30
Abhishek Kumar 8497f70b46
ui: make events tab selected columns persistent using cache (#11317)
Fixes #10308

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-07-30 11:07:38 +05:30
Abhisar Sinha da3ba17884
Fix build and ui build errors in main (#11332)
* fix build error in registeruserdatacmd

* remove unused imports

* fix ui build errors
2025-07-29 17:02:16 -03:00
nvazquez 2bffabba7b
Fix unit tests after merge forward 2025-07-29 13:41:40 -03:00
Daan Hoogland 8429223782 missing imports from merge forward 2025-07-29 17:04:06 +02:00
Daan Hoogland 0b3959221b Merge branch '4.20' 2025-07-29 16:50:55 +02:00
Vishesh f2bda46419
Upgrade noVNC from 1.4.0 to 1.6.0 (#11119) 2025-07-29 15:17:37 +02:00
Suresh Kumar Anaparti 86827f871d
Update CIDR/Gateway of the Shared Networks from Guest IP ranges (#11249) 2025-07-29 10:30:14 +02:00
Vishesh f6ad184ea2
Feature: Add support for GPU with KVM hosts (#11143)
This PR allows attaching of GPU devices via PCI, mdev or VF to an Instance for KVM.

It allows the operator to discover the GPU devices on the KVM host and create a Compute Offering with GPU support based on the available GPU devices on the host. Once the operator has created the Compute offering, it can be used by users to launch Instances with GPU devices.
2025-07-29 13:46:24 +05:30
John Bampton b92c1965b9
README: add `Contributors Avatars` and `Star History` (#11311) 2025-07-29 09:41:22 +02:00
Abhishek Kumar 4aed972e78
api,server,extensions: allow updating extension resource map details (#11303)
* api,server,extensions: allow updating extension resource map details

This PR makes changes for allowing updating details for an extension resource mapping.
Currently, extensions only support Cluster to be registered therefore changes has been added to updateCluster functionality.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-07-29 10:25:52 +05:30
Harikrishna 9fee6dae34
Fix local storage pool disconnect issue (#11200) 2025-07-28 19:41:12 +05:30
Abhishek Kumar d693736ee8
ui: fix NAN% used memory for vm (#11307) 2025-07-28 14:59:17 +02:00
Abhishek Kumar 524f0d80db
server: fix NaN values for external resource metrics (#11302)
CPU and RAM values for external resource metrics was showing NaN values. This fixes the behaviour.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-07-28 17:56:25 +05:30
Suresh Kumar Anaparti 45edf82efa
[UI] Fix for local storage enable/disable toggle in edit zone (#11309) 2025-07-28 17:54:00 +05:30
Suyang(Dawson) Chen 1a9efe8de3
Add unit tests for getConfigResources in ModuleDefinitionSet and improve context readability (#11042) 2025-07-28 11:37:01 +02:00
Nicolas Vazquez 21dde2b9a2
[DB] Add force recreate parameter to cloudstack-setup-databases script (#11239) 2025-07-28 14:27:15 +05:30
Harikrishna cca8b2fef9
Extensions Framework & Orchestrate Anything (#9752)
The Extensions Framework in Apache CloudStack is designed to provide a flexible and standardised mechanism for integrating external systems and custom workflows into CloudStack’s orchestration process. By defining structured hook points during key operations—such as virtual machine deployment, resource preparation, and lifecycle events—the framework allows administrators and developers to extend CloudStack’s behaviour without modifying its core codebase.
2025-07-28 10:41:17 +05:30
Abhishek Kumar 217ff27650
ui: fix compute offering edit (#11232)
Fixes #11216

There is no parameter named 'storageaccessgroups' in updateServiceOffering API.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-07-26 13:17:31 +05:30
Abhishek Kumar 407072ffd4
schema,framework/db,server: fix user_vm_details usage (#11292)
* schema,framework/db,server: fix user_vm_details usage

Continuation of #10736

* python files

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-07-26 12:24:05 +05:30
Nicolas Vazquez 13892e2ff0
[CKS] Create Kubernetes ISO support for ARCH optional parameter (#10986)
* [CKS] Create Kubernetes ISO support for ARCH optional parameter

* Include arch on the build name

* Refactor

* Fix ISO naming

* Apply suggestions from code review

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

* Reorder parameters

---------

Co-authored-by: Wei Zhou <weizhou@apache.org>
2025-07-25 16:45:54 -03:00
Pearl Dsilva 0d4147f3f6
Netris Network Plugin Integration with CloudStack (#10458)
The Netris Plugin introduces Netris as a network service provider in CloudStack to be able to create and manage Virtual Private Clouds (VPCs) in CloudStack, being able to orchestrate the following network functionalities:

- Network segmentation with Netris-VXLAN isolation method
- Routing between "public" IP and network segments with an ACS ROUTED mode offering
- SourceNAT, DNAT, 1:1 NAT between "public" IP and network segments with an ACS NATTED mode offering
- Routing between VPC network segments (tiers in ACS nomenclature)
- Access Lists (ACLs) between VPC tiers and "public" network (TCP, UDP, ICMP) both as global egress rules and "public" IP specific ingress rules.
- ACLs between VPC network tiers (TCP, UDP, ICMP)
- External load balancing – between VPC network tiers and "public" IP
- Internal load balancing – between VPC network tiers
- CloudStack Virtual Router services (DHCP, DNS, UserData, Password Injection, etc…)
2025-07-25 15:26:42 +05:30
Suresh Kumar Anaparti ae50103704
Config 'vm.network.nic.max.secondary.ipaddresses' - Sync default value (and value if not set) to 10 as per the config description and default value in parseInt of the config (#11256) 2025-07-25 11:13:33 +02:00
John Bampton 074f75838e
Fix pre-commit warnings for deprecated stage names (#11276) 2025-07-25 09:23:52 +02:00
nvazquez 935c568082
Merge fix for UI 2025-07-24 13:33:30 -03:00
Nicolas Vazquez 11455f6d49
UI: Add option to Login to a specific Project view via setting on config.json (#10935)
* UI: Login to a specific Project view

* Fix project icon

* Add the option to display project on login on the config.json file

---------

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
2025-07-24 11:42:25 -03:00
Nicolas Vazquez 22b753e930
[UI] Deploy VM: Preselect first available template (#11207) 2025-07-24 12:18:07 +02:00
Abhishek Kumar 83bccead3d
schema, refactor: rename cloud.user_vm_details to cloud.vm_instance_details (#10736)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Co-authored-by: dahn <daan@onecht.net>
2025-07-24 12:08:29 +02:00
John Bampton 7da5f9002b
misc: fix typo `sercurity` -> `security` (#10966) 2025-07-24 09:46:16 +02:00
Pearl Dsilva 071e612f40
UI: Fix OS Type displayed for a VM (#11075)
* UI: Fix OS Type displayed

* remove unnecessary method for os name change

---------

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-07-24 12:59:36 +05:30
John Bampton 1fbe1d7682
pre-commit: add gitleaks to detect hardcoded secrets (#11064) 2025-07-23 11:29:41 -04:00
John Bampton 165ab0aabe
Fix HTML license; standardize HTML code (#11067)
Co-authored-by: Vishesh <vishesh92@gmail.com>
2025-07-23 17:25:15 +02:00
John Bampton fb3bb3fd56
pre-commit: upgrade markdownlint to the latest version (#11066) 2025-07-23 17:23:20 +02:00
dahn 6d5cefdfe9
add since parameter to BackupScheduleResponse (#11265) 2025-07-23 16:58:45 +05:30
Abhisar Sinha d63899fc8a
Set Content-Type from the file type (#11093) 2025-07-23 16:12:53 +05:30
dahn 666784f4e5
ovm deprecation (#11196)
Co-authored-by: Daan Hoogland <dahn@apache.org>
2025-07-23 14:18:27 +05:30
Vishesh a710ff8c6d
UI: Fix ISO Hypervisor selection (#11261) 2025-07-23 13:07:02 +05:30
Bernardo De Marco Gonçalves 9d049707d5
Fix deletion of backup schedules (#11222) 2025-07-23 09:31:17 +02:00
Abhisar Sinha e7172161dd
Guard OS type update for iso/template with existing vms (#11215)
* Guard OS type update for iso/template with existing vms

* fix identation

* rename vm -> instance

* force update iso/template as true by default via api

* add missing message.success.update.iso label
2025-07-22 18:42:24 +05:30
João Jandre 6ad9296412
Fix KVM incremental snapshot removal when using multiple secondary storages (#11180)
When removing an incremental snapshot (For both KVM and XenServer), it is checked if the snapshot has a child or not. If it has, then the snapshot is not removed from the storage.

For KVM incremental snapshots, snapshots in the same chain may be on different secondary storages (within the same zone).

However, the child search process only considers snapshots from the same secondary storage as theirs. Therefore, if a snapshot has its parent snapshot on a different secondary storage, it will be completely removed, making the snapshot chain inconsistent.
2025-07-21 16:47:27 +05:30
dahn c5da9e6188
Update .asf.yaml re-add sudo87 2025-07-18 12:52:49 +02:00
dahn 1003c8034c
Update .asf.yaml remove sudo87 2025-07-18 12:51:48 +02:00
dahn 3687032ed6
Update .asf.yaml re-add rosi 2025-07-18 09:19:44 +02:00
dahn a849b822c2
Update .asf.yaml: remove new committer Bernardo (#11231) 2025-07-17 20:14:20 +05:30
Pearl Dsilva 15c09af5cc
UI: Fix traffic Label on Zone creation wizard for VMware (#11101) 2025-07-17 09:31:28 +02:00
Daan Hoogland b57994eeb0 Merge branch '4.20' 2025-07-16 14:05:19 +02:00
Manoj Kumar 65d359228d
Allow populating generic templates during Zone Deployment (#10947) 2025-07-16 12:24:06 +02:00
João Jandre 53eb2c5b9b
File-based disk-only VM snapshot with KVM as hypervisor (#10632)
Co-authored-by: João Jandre <joao@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2025-07-16 08:54:07 +02:00
Erik Böck bb75abcffa
Usage parsers refactoring (#11097) 2025-07-16 08:38:47 +02:00
Suresh Kumar Anaparti 3220eb442a
PowerFlex/ScaleIO - MDM and host SDC connection enhancements (#11047)
* Cumulative enhancements fix for ScaleIO: MDM add/remove, Host prepare/unprepare, validate Storage Pool can be created in Agent.

- Implemented validation to fail Host disconnect from Storage Pool if there are Volumes attached and SDC client MDM removal requires scini service to be restarted
- Implemented Storage Pool validation by checking whether MDM addresses from configuration file and from memory (using CLI) matches, otherwise file ModifyStoragePool command.
- Introduced configuration key to apply timeout after making MDM changes for ScaleIO: powerflex.mdm.change.apply.timeout.ms (default 1000ms)
- Implemented logic to apply timeout after making MDM changes for ScaleIO in prepare and unprepare logic
- Added detection of MDM removal support via CLI
- If MDM removal support via CLI supported then use CLI, fall back to edit drv_cfg.txt and restart scini instead

Co-authored-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
Co-authored-by: mprokopchuk <mprokopchuk@apple.com>
2025-07-16 08:25:28 +02:00
Nicolas Vazquez 84b807eeee
[CKS] Simplify logic for scaling CKS cluster service offerings (#11063) 2025-07-16 08:23:33 +02:00
Vishesh f52e05863e
UI fix api in project view (#11191)
* Add project id for post requests as well in the params

* Replace leftover api calls to getAPI calls

* ui: don't remove values from request if the value is null or empty string

* Address comments

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* fixup

* Return null if guiTheme requests fails

---------

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-07-15 18:19:46 +05:30
Manoj Kumar e8ab0ae70a
CPU to Memory weight based algorithm to order cluster (#10997)
* CPU to Memory weight based algorithm to order cluster
host.capacityType.to.order.clusters config will support new algorithm: COMBINED
which will work with host.capacityType.to.order.clusters.cputomemoryweight and capacity will be
computed based on CPU and memory both and using weight factor

* minor changes

* add unit tests

* update desc and add validation

* handle copilot review comments

* add log indicating chosen capacityType for ordering

---------

Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2025-07-15 16:40:53 +05:30
Bryan Lima fb6adacc51
GUI whitelabel runtime system (#8942)
* Add first version

* Add guithemedetails join

* Update since and remove extra line

* Limit information on API response for non admin users

* Add base files for preset themes

* Add miising license

* Revert cookie check

* Fix imports

* Fix pre-commit

* Address log4j2 string to format review and add license to css files

* Fix infinite loading

* Move event details to service implementation

* Move view to a specific view file

* Refactoring gui theme classes

* Normalize package name

* Address Henrique review

* Fix create table SQL

* Add interface for Dao classes

* Remove extra tabs

* Address unauthorized call when 2FA is enabled

* Remove trailing whitespaces

* Apply suggestions from code review

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

---------

Co-authored-by: Henrique Sato <henriquesato2003@gmail.com>
Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-07-15 13:29:09 +05:30
Gabriel Pordeus Santos 6059724189
Hide CloudStack version from XML response when unauthenticated (#10575) 2025-07-14 12:55:09 +02:00
slavkap 54b44cc316
KVM: Option to deploy a VM with existing volume/snapshot (#10503)
* Option to deploy a VM with existing volume/snapshot

* smoke test changes

check if the hypervisor is KVM
check if the primary storage's scope is ZONE wide

* skip all tests if the storage isn't Zone-Wide and the hypervisor isn't KVM

* support StorPool tags

add StorPool tags to a volume created from snapshot or to a volume which
will be attached as a ROOT to a new VM

* Add StorPool tags on the new ROOT volume

* Add the StorPool's tags when volume is created from a snapshot or a
volume is attached as a ROOT to a VM

* Addressed review
2025-07-14 15:10:45 +05:30
Daan Hoogland 0dbd761fbb Merge branch '4.20' 2025-07-14 11:17:08 +02:00
shrikantjoshi-hpe 4d46bece4a
fix priority for volume copy operation (#11109) 2025-07-14 07:50:58 +02:00
roopsai f9588960d4
Refactor: Replace sleep() with wait() (#10504) 2025-07-11 15:20:28 +02:00
Ashutosh Kr Singh 51126a7c10
iteration optimized (#10576) 2025-07-11 15:18:43 +02:00
Manoj Kumar 8e4fe1c370
Allow configuring Announcement banner by admin (#10951)
* Allow configuring Announcement banner by admin

* add license

* revert un-necessary changes from package-lock.json

* banner should use 100% width and push down content down

* fix grey area issue

* show error page if config.json is not valid
2025-07-07 13:56:58 +05:30
Suresh Kumar Anaparti 749ddb975f
Support ApiServer to enforce POST requests for state changing APIs and requests with timestamps (#10899)
Co-authored-by: Kevin Li <kli74@apple.com>
2025-07-05 15:25:48 +02:00
Nicole Schmidt d5fd3ec36e
Add API command remove management server (#10325)
* Add API command remove management server

* Apply suggestions from code review

Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>

* Apply sugestions from code review

* Update log message with current management server state

Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>

* Apply suggestions from code review

Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

* Update api/src/main/java/org/apache/cloudstack/api/command/admin/management/RemoveManagementServerCmd.java

Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

* Remove unused imports

---------

Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2025-07-04 14:49:28 -03:00
Daan Hoogland 3e3a0c0678 Merge branch '4.20' 2025-07-03 15:29:05 +02:00
Suresh Kumar Anaparti be22bfe2c9
Management Server - Prepare for Maintenance and Cancel Maintenance improvements (#10995)
* Management Server - Prepare for Maintenance and Cancel Maintenance improvements:
- Added new setting 'management.server.maintenance.ignore.maintenance.hosts' to ignore hosts in maintenance states  while preparing management server for maintenance. This skips agent transfer and agents count check for hosts in maintenance.
- Rebalance indirect agents after cancel maintenance, using rebalance parameter in cancelMaintenance API
- Force maintenance after maintenance window timeout, using forced parameter in prepareForMaintenance API.
- Propagate 'indirect.agent.lb.check.interval' setting change to the host agents.

* rebases fixes

* code improvements, cleanup

* [UI] Set rebalance true by default in cancel maintenance dialog

* Update MS state after executing cluster cmd in the target MS, and some code improvements

* code improvements

* Ensure the host lb algorithm 'shuffle' is applied once before disabling the indirect agent lb check background task
2025-07-03 12:17:04 +05:30
Nicolas Vazquez 16c60c7528
Support Direct Download on Ceph (#11069) 2025-06-24 14:19:01 +02:00
Abhishek Kumar 0bd35a5403
ui: fix missing changes from #10814 (#11060)
Some changes from PR #10814 are missing in DeployVM and DeployVnf
wizards causing warnings in teh browser console.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-06-23 17:48:46 +02:00
Suyang(Dawson) Chen 5b7c3b475e
docs: Update INSTALL.md for frontend build instructions (#11057)
Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2025-06-19 10:17:34 +02:00
Nicolas Vazquez 6adfda2818
CKS Enhancements (#9102)
CKS Enhancements:

* Ability to specify different compute or service offerings for different types of CKS cluster nodes – worker, master or etcd

* Ability to use CKS ready custom templates for CKS cluster nodes

* Add and Remove external nodes to and from a kubernetes cluster

Co-authored-by: nvazquez <nicovazquez90@gmail.com>

* Update remove node timeout global setting

* CKS/NSX : Missing variables in worker nodes

* CKS: Fix ISO attach logic

* CKS: Fix ISO attach logic

* address comment

* Fix Port - Node mapping when cluster is scaled in the presence of external node(s)

* CKS: Externalize control and worker node setup wait time and installation attempts

* Fix logger

* Add missing headers and fix end of line on files

* CKS Mark Nodes for Manual Upgrade and Filter Nodes to add to CKS cluster from the same network

* Add support to deploy CKS cluster nodes on hosts dedicated to a domain

---------

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>

* Support unstacked ETCD

---------

Co-authored-by: nvazquez <nicovazquez90@gmail.com>

* Fix CKS cluster scaling and minor UI improvement

* Reuse k8s cluster public IP for etcd nodes and rename etcd nodes

* Fix DNS resolver issue

* Update UDP active monitor to ICMP

* Add hypervisor type to CKS cluster creation to fix CKS cluster creation when External hosts added

* Fix build

* Fix logger

* Modify hypervisor param description in the create CKS cluster API

* CKS delete fails when external nodes are present

* CKS delete fails when external nodes are present

* address comment

* Improve network rules cleanup on failure adding external nodes to CKS cluster

* UI: Fix etcd template was not honoured

* UI: Fix etcd template was not honoured

* Refactor

* CKS: Exclude etcd nodes when calculating port numbers

* Fix network cleanup in case of CKS cluster failure

* Externalize retries and inverval for NSX segment deletion

* Fix CKS scaling when external node(s) present in the cluster

* CKS: Fix port numbers displayed against ETCD nodes

* Add node version details to every node of k8s cluster - as we now support manual upgrade

* Add node version details to every node of k8s cluster - as we now support manual upgrade

* update column name

* CKS: Exclude etcd nodes when calculating port numbers

* update param name

* update param

* UI: Fix CKS cluster creation templates listing for non admins

* CKS: Prevent etcd node start port number to coincide with k8s cluster start port numbers

* CKS: Set default kubernetes cluster node version to the kubernetes cluster version on upgrade

* CKS: Set default kubernetes cluster node version to the kubernetes cluster version on upgrade

* consolidate query

* Fix upgrade logic

---------

Co-authored-by: nvazquez <nicovazquez90@gmail.com>

* Fix CKS cluster version upgrade

* CKS: Fix etcd port numbers being skipped

* Fix CKS cluster with etcd nodes on VPC

* Move schema and upgrade for 4.20

* Fix logger

* Fix after rebasing

* Add support for using different CNI plugins with CKS

* Add support for using different CNI plugins with CKS

* remove unused import

* Add UI support and list cni config API

* necessary UI changes

* add license

* changes to support external cni

* UI changes

* Fix NPE on restarting VPC with additional public IPs

* fix merge conflict

* add asnumber to create k8s svc layer

* support cni framework to use as-numbers

* update code

* condition to ignore undefined jinja template variables

* CKS: Do not pass AS number when network ID is passed

* Fix deletion of Userdata / CNI Configuration in projects

* CKS: Add CNI configuration details to the response and UI

* Explicit events for registering cni configuration

* Add Delete cni configuration API

* Fix CKS deployment when using VPC tiers with custom ACLs

* Fix DNS list on VR

* CKS: Use Network offering of the network passed during CKS cluster creation to get the AS number

* CKS cluster with guest IP

* Fix: Use control node guest IP as join IP for external nodes addition

* Fix DNS resolver issue

* Improve etcd indexing - start from 1

* CKS: Add external node to a CKS cluster deployed with etcd node(s) successfully

* CKS: Add external node to a CKS cluster deployed with etcd node(s) successfully

* simplify logic

* Tweak setup-kube-system script for baremetal external nodes

* Consider cordoned nodes while getting ready nodes

* Fix CKS cluster scale calculations

* Set token TTL to 0 (no expire) for external etcd

* Fix missing quotes

* Fix build

* Revert PR 9133

* Add calico commands for ens35 interface

* Address review comments: plan CKS cluster deployment based on the node type

* Add qemu-guest-agent dependency for kvm based templates

* Add marvin test for CKS clusters with different offerings per node type

* Remove test tag

* Add marvin test and fix update template for cks and since annotations

* Fix marvin test for adding and removing external nodes

* Fix since version on API params

* Address review comments

* Fix unit test

* Address review comments

* UI: Make CKS public templates visible to non-admins on CKS cluster creation

* Fix linter

* Fix merge error

* Fix positional parameters on the create kubernetes ISO script and make the ETCD version optional

* fix etcd port displayed

* Further improvements to CKS  (#118)

* Multiple nics support on Ubuntu template

* Multiple nics support on Ubuntu template

* supports allocating IP to the nic when VM is added to another network - no delay

* Add option to select DNS or VR IP as resolver on VPC creation

* Add API param and UI to select option

* Add column on vpc and pass the value on the databags for CsDhcp.py to fix accordingly

* Externalize the CKS Configuration, so that end users can tweak the configuration before deploying the cluster

* Add new directory to c8 packaging for CKS config

* Remove k8s configuration from resources and make it configurable

* Revert "Remove k8s configuration from resources and make it configurable"

This reverts commit d5997033ebe4ba559e6478a64578b894f8e7d3db.

* copy conf to mgmt server and consume them from there

* Remove node from cluster

* Add missing /opt/bin directory requrired by external nodes

* Login to a specific Project view

* add indents

* Fix CKS HA clusters

* Fix build

---------

Co-authored-by: Nicolas Vazquez <nicovazquez90@gmail.com>

* Add missing headers

* Fix linter

* Address more review comments

* Fix unit test

* Fix scaling case for the same offering

* Revert "Login to a specific Project view"

This reverts commit 95e37563f4.

* Revert "Fix CKS HA clusters" (#120)

This reverts commit 8dac16aa35.

* Apply suggestions from code review about user data

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Update api/src/main/java/org/apache/cloudstack/api/command/user/userdata/BaseRegisterUserDataCmd.java

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Refactor column names and schema path

* Fix scaling for non existing previous offering per node type

* Update node offering entry if there was an existing offering but a global service offering has been provided on scale

---------

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
Co-authored-by: Daan Hoogland <daan@onecht.net>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-06-19 11:00:42 +05:30
Davi Torres 4662ffc424
Changes baseurl for downloading kubectl (#11040) 2025-06-17 16:40:28 +02:00
Felipe f8c4121ea3
Add access modifiers to `VirtualMachineTO` (#9277)
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2025-06-17 08:35:04 +02:00
Suyang(Dawson) Chen 6aaaa838b2
docs: revise INSTALL.md with updated Maven setup (#11025) 2025-06-16 14:47:20 +02:00
Wei Zhou ea7919b0c1
Remove test/selenium/ test/src-not-used/ (#11013) 2025-06-16 09:02:35 +02:00
julien-vaz e83a347ace
Improves StoragePoolAllocators' logs (#10475)
Co-authored-by: Julien Hervot de Mattos Vaz <julien.vaz@scclouds.com.br>
2025-06-14 11:23:41 +02:00
slavkap 28ff19b751
enabled discard option (#10077)
Enable the discard option for virtio-blk and virtio-scsi devices for
volumes on StorPool storage
2025-06-14 11:20:47 +02:00
slavkap 685ee9e78f
StorPool: support for direct download (#9833) 2025-06-14 11:19:37 +02:00
João Jandre 7f13beb36a
Check Qcow2 version before using --bitmaps (#10896)
* check version before using --bitmaps

* use cloudruntimeexception
2025-06-13 20:30:46 +02:00
Daniel Augusto Veronezi Salvador 380884ed50
Fix data being replicated on VM's metadata file in the VR (#10987) 2025-06-13 20:13:09 +02:00
Lucas Martins 675ee2ab39
Add parameter to not create additional users on `cloudstack-setup-databases` (#9969)
Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2025-06-13 13:35:42 +02:00
Abhishek Kumar 28e2411110
engine-schema: fix naming for AlmaLinux (#11011)
In PR #10773, 'AlmaLinux' was incorrectly written as 'Alma Linux' in the guest OS category name and OS classification. This PR corrects the naming to 'AlmaLinux'.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-06-13 12:09:24 +05:30
Suyang(Dawson) Chen 4a672fd9b3
docs: fix outdated Maven subtitle in INSTALL.md (#11012) 2025-06-12 20:18:56 +02:00
Abhishek Kumar 2d669dbe54
engine-schema: fix duplicate statements in upgrade path (#11001)
Some statements to add new columns to cloud.guest_os_category have been
added twice by mistake as part of #10773. These statements are idempotent and won't affect
upgrade as such but better to cleanup

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-06-12 11:34:43 +05:30
Abhishek Kumar 40b0e7cd63
ui: fix build after forward merge (#11010)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-06-12 11:33:59 +05:30
slavkap 5c0346ea86
Adding device ID to a StorPool volume (#10587) 2025-06-11 19:39:51 +02:00
Pearl Dsilva a13728360b Fix issue with forward merge 2025-06-11 18:12:18 +05:30
Pearl Dsilva 875223c5b4 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-06-11 17:11:41 +05:30
Abhishek Kumar bce17b627d
ui,api,server: template categorization based on os (#10773)
Adds new interface for image selection (template/iso) for an instance in UI.
Old interface can still be used and it can be configured using UI configuration (config.json)

OS categories/Guest OS categories have been improved with ability to create new categories, delete an existing category, and marking a category as featured to allow it to show up in the UI in the image selection interface.

New APIs added:
- addOsCategory
- deleteOsCategory
- updateOsCategory

APIs updated:
- updateOsType
- listTemplates
- listOsCategories

Several improvements in UI especially related to forms - DeloyVM, ReinstallVM, CreateVnfAppliance, AddAutoscaleGroup.

DeployVM form can now be opened from template/ISO details view with query params.

Reorganized (removed and added some) OS categories to the following (in the same order):
```
1. Ubuntu
2. Debian
3. Fedora
4. CentOS
5. Rocky Linux
6. Alma Linux
7. Oracle
8. RedHat
9. SUSE
10. Windows
11. Other
```

Documentation PR: https://github.com/apache/cloudstack-documentation/pull/500

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-06-10 15:25:51 +05:30
Abhishek Kumar 41b4f0afd5
ui: missing changes from #10115 (#10949)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-06-04 20:13:43 +02:00
Manoj Kumar fa85a75bc8
Log previous and new value of configuration when reset/update API is called (#10769) 2025-06-04 12:06:25 +02:00
Manoj Kumar 7632814cd2
Instance lease: Allow deployment of instances with lease duration and leaseexpiry action (#10560)
* FR-248: Instance lease, WIP commit

* insert lease expiry into db and use that to filter exiring vms, add asyncjobmanager

* Add leaseDuration and leaseExpiryAction in Service offering create flow

* Update listVM cmd to allow listing only leased instances

* Add methods to fetch instances for which lease is expiring in next days

* Changes included:
config key setup and configured for alert email
lease options in create and update vm screen
handle delete protection, edit vm, create vm
validated stop and detroy, delete protection

* Update UI screens for leased properties coming from config and service offering

* use global lock before running scheduler

* Unit tests

* Flow changes done in UI based on discussion

* Include view changes in schema upgrade files and use feature in various UI elements

* Added integration test for vm deployment, UI enhancements for user persona, bug fixes

* validate integration tests, minor ui changes and log messages

* fix build: moving configkey from setup to test itself

* Disable testAlert to unblock build and trim whitespaces in integration tests

* Address review comments

* Minor changes in EditVM screen

* Use ExecutorService instead of Timer and TimerTask

* Additional review comments

* Incorporate following changes:
1. Execute lease action once on the instance
2. Cancel lease on instance when feature is disabled
3. Relevant events when lease gets disabled, cancelled, executed
4. Disable associating lease after deployment
5. UI elements and flow changes
6. Changes based on feedback from demo

* Handle pr review comments

* address review comments

* move instance.lease.enabled config to VMLeaseManager interface

* bug fix in edit instance flow and reject api request for invalid values

* max allowed lease is for 100 years

* log instance ids for expired instance

* Fix config validation for value range and code coverage improvement

* fix lease expiry request failures in async

* dont use forced: true for StopVmCmd

* Update server/src/main/java/org/apache/cloudstack/vm/lease/VMLeaseManager.java

Co-authored-by: Vishesh <vishesh92@gmail.com>

* handle review comments

---------

Co-authored-by: Rohit Yadav <rohityadav89@gmail.com>
Co-authored-by: Vishesh <vishesh92@gmail.com>
2025-05-28 17:40:09 +05:30
Daan Hoogland 650b5ec3da Merge branch '4.20' 2025-05-27 18:18:39 +02:00
Harikrishna 99863c2fa5
Imporve socketChannel closing in NioConnection (#10895) 2025-05-23 13:13:04 +05:30
Pearl Dsilva f496ed6eaf Merge branch '4.20' of https://github.com/apache/cloudstack 2025-05-22 12:05:47 +05:30
Wei Zhou 97c96a55ba
.github: fix sonar checks (#10894)
* .github: fix sonar check

* .github: fix main sonar check

* add more pom.xml files
2025-05-20 15:26:54 +02:00
Wei Zhou 96b8e23767
kvm: fix vm deployment from RAW template (#10880)
* kvm: fix vm deployment from RAW template

* Update plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java

Co-authored-by: João Jandre <48719461+JoaoJandre@users.noreply.github.com>

---------

Co-authored-by: João Jandre <48719461+JoaoJandre@users.noreply.github.com>
2025-05-19 21:44:01 +02:00
Wei Zhou 842b2f8c24
Merge remote-tracking branch 'apache/4.20' 2025-05-19 21:25:37 +02:00
Harikrishna b17808bfba
Introducing Storage Access Groups for better management for host and storage connections (#10381)
* Introducing Storage Access Groups to define the host and storage pool connections

In CloudStack, when a primary storage is added at the Zone or Cluster scope, it is by default connected to all hosts within that scope. This default behavior can be refined using storage access groups, which allow operators to control and limit which hosts can access specific storage pools.

Storage access groups can be assigned to hosts, clusters, pods, zones, and primary storage pools. When a storage access group is set on a cluster/pod/zone, all hosts within that scope inherit the group. Connectivity between a host and a storage pool is then governed by whether they share the same storage access group.

A storage pool with a storage access group will connect only to hosts that have the same storage access group. A storage pool without a storage access group will connect to all hosts, including those with or without a storage access group.
2025-05-19 11:33:29 +05:30
Manoj Kumar d5ba23c848
Introduce volume allocation algorithm global configuration (#10696) 2025-05-16 14:06:42 +02:00
Erik Böck 7bab40db6f
disabled create and add volume button for VMs in Error state (#10859)
Co-authored-by: erik.silva.scclouds <erik.silva@scclouds.com.br>
2025-05-15 09:36:42 +02:00
Suresh Kumar Anaparti 572fc11a64
[PowerFlex] Add & Remove PowerFlex/ScaleIO MDMs for the storage SDC connections (#9903)
* Add & Remove PowerFlex/ScaleIO MDMs while preparing & unpreparing the storage SDC connections (instead of start & stop scini)

* Add/Remove MDM IP addresses during Host connection/disconnection to/from storage pool when powerflex.connect.on.demand is false

* unit test fixes

* Don't remove MDM IPs from SDC when any volumes mapped to SDC

* Don't remove MDM IPs when other pools of same ScaleIO/PowerFlex cluster are connected

* rebase fixes

* update changes, to not remove/disconnect MDMs on maintenance

* import fixes after rebase
2025-05-15 12:42:13 +05:30
Daan Hoogland 64828f66e8 Merge branch '4.20' 2025-05-13 13:34:23 +02:00
João Jandre 6fdaf51ddc
KVM incremental snapshot feature (#9270)
* KVM incremental snapshot feature

* fix log

* fix merge issues

* fix creation of folder

* fix snapshot update

* Check for hypervisor type during parent search

* fix some small bugs

* fix tests

* Address reviews

* do not remove storPool snapshots

* add support for downloading diff snaps

* Add multiple zones support

* make copied snapshots have normal names

* address reviews

* Fix in progress

* continue fix

* Fix bulk delete

* change log to trace

* Start fix on multiple secondary storages for a single zone

* Fix multiple secondary storages for a single zone

* Fix tests

* fix log

* remove bitmaps when deleting snapshots

* minor fixes

* update sql to new file

* Fix merge issues

* Create new snap chain when changing configuration

* add verification

* Fix snapshot operation selector

* fix bitmap removal

* fix chain on different storages

* address reviews

* fix small issue

* fix test

---------

Co-authored-by: João Jandre <joao@scclouds.com.br>
2025-05-12 10:50:30 -03:00
Pearl Dsilva 1e5d133033 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-05-12 13:12:09 +05:30
Pearl Dsilva 39c5641cbe Merge branch '4.20' of https://github.com/apache/cloudstack 2025-05-05 10:15:05 +05:30
Wei Zhou fd74895ad0
New feature: Reconcile commands (CopyCommand, MigrateCommand, MigrateVolumeCommand) (#10514) 2025-05-02 09:15:03 +02:00
Daan Hoogland d7d9d131b2 Merge branch '4.20' 2025-05-01 15:44:09 +02:00
Ashutosh Kr Singh c2259cef5d
docs: correct outdated Maven link in install.md (#10800) 2025-05-01 09:20:49 +02:00
Pearl Dsilva 2df1ac5106 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-04-28 12:15:48 +05:30
Pearl Dsilva 576b97ba22 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-04-24 09:22:40 +05:30
Pearl Dsilva ffc0d51616 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-04-22 03:31:44 -04:00
Pearl Dsilva 193d6ef52f Merge branch '4.20' of https://github.com/apache/cloudstack 2025-04-18 18:29:44 -04:00
Daan Hoogland 55ca114525 Merge branch '4.20' 2025-04-18 12:14:44 +02:00
Daan Hoogland 190f8b8ab5 Merge release branch 4.20 to main
* 4.20:
  utils: fix extra slash in Redfish default systems url path (#10630)
2025-04-18 11:23:36 +02:00
dahn aa4718a301
Fix merge error: use new method of getting scoped vars (#10751) 2025-04-18 11:20:26 +02:00
Daan Hoogland 3c75d9363b Merge branch '4.20' 2025-04-17 15:59:41 +02:00
Eric Kalendra 55c811547a
Update Mockito to 5.16.1 (#10686)
Dependency name change mockito-inline to mockito-core. Inline is now the default and the last version of mockito-inline released is 5.2.0.

assertj-core in user-authenticators/saml2 pulls in an incompatible version of byte-buddy and required an exclusion. Updating the version of assertj is left for a future PR.
The upgrade requires Java 11+, dropping support for Java 8. CloudStack documentation already says to use Java 11 and does not indicate that java 8 is supported.

Test classes using @RunWith(MockitoJUnitRunner.class) now get run in strict mode. Changes were made to tests where the stubbing intention was clear. In ManagementServerMaintenanceManagerImplTest there are 5 tests where the intention of the test is unclear. Each of the statements now use Mockito.lenient() to avoid the exception. Other cases in the tests follow a similar pattern.
Minor clean up.

Both @Spy and Mockito.spy( should not be used. Favored the annotation.
Both @RunWith(MockitoJUnitRunner.class) and MockitoAnnotations.openMocks(this); should not be used. Favored the annotation.
Unnecessary extends TestCase removed.
@InjectMocks and new in statement unnecessary. Removed new when issue presented.
Some of the Cmd classes like UpdateNetworkCmd have a type tree that includes fields of type Object. This appears to cause issues with injection, requiring that @Mock fields be available. This is where the following fields were added in multiple places:
Object job;
ResponseGenerator _responseGenerator;
Wrong number of parameters for Mockito.when in LibvirtRevertSnapshotCommandWrapperTest.java
2025-04-16 18:10:28 +05:30
rosi-shapeblue 41e881ea01
added: rosi as a contributor (#10724) 2025-04-15 15:31:16 +02:00
julien-vaz b2b2218a8a
Launch RESIZE event on volume snapshot revert (#10482)
Co-authored-by: Julien Hervot de Mattos Vaz <julien.vaz@scclouds.com.br>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2025-04-15 09:49:53 +02:00
Pearl Dsilva 4d572fa6d3 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-04-13 23:23:50 -04:00
Dahn Highland 4c31f9d533 Merge release branch 4.20 to main
* 4.20:
  xenserver: do not destroy halted hypervisor vm (#9175)
  define the limit of projects through the UI (#10652)
  fix projects metrics on dashboard (#10651)
  systemvm: Bump systemvm template version to debian 12.10 (#10628)
  Enhance VPC Network Tier form to auto-populate  Gateway, and Netmask (#10617)
2025-04-09 13:02:31 +02:00
John Bampton f275c28838
test(python): fix code comment typo; Valiate -> Validate (#10536) 2025-04-08 12:44:56 +02:00
John Bampton f206137f83
docs: fixes grammar and spelling in Markdown files only (#10656) 2025-04-08 12:44:14 +02:00
Manoj Kumar fd3d605dd1
Add sudo87 as collaborator (#10654) 2025-04-05 11:51:12 +02:00
John Bampton 0934fb1b53
docs: fix grammar and spelling in CONTRIBUTING.md (#10642) 2025-04-02 14:32:16 +02:00
dahn 806737068b
Update .asf.yaml 2025-04-02 14:25:50 +02:00
dahn ba835541ab
Update .asf.yaml 2025-04-02 14:25:28 +02:00
Bryan Lima cb4848bc1a
Add support to RBD erasure code pools (#9808)
* Readd filename string on qemuimg create

* Remove empty object on the data pool details of storage pools with no data pool

* Only use the method createPhysicalDiskByLibVirt with RBD when the pool is of erasure code type. Also added javadoc for createPhysicalDisk method

* Change literal '/' string to File.separator

* Add support for erasure code pools

* Fix null on putAll
2025-04-02 08:19:00 -03:00
dahn 2dfe6a6333
Update .asf.yaml 2025-03-29 07:11:56 +01:00
dahn 99b6f45a87
Update .asf.yaml 2025-03-29 07:11:05 +01:00
dahn 5e8238c382
noop Update of .asf.yaml 2025-03-28 19:51:38 +01:00
Lucas Martins 8d18c1e788
Change resource settings tab to be type based (#10596)
Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
2025-03-28 10:30:58 +01:00
Daan Hoogland 8af021c6f6 Merge branch '4.20' 2025-03-27 17:03:13 +01:00
Rohit Yadav f47bd61279
framework/cluster: fix NPE for ms-host status when mgr stops (#10500)
* framework/cluster: fix NPE for ms-host status when mgr stops

This handles an NPE case for when management server host status is not
found in the DB, when stopping the cluster manager.

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

* Update framework/cluster/src/main/java/com/cloud/cluster/ClusterManagerImpl.java

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

* Update framework/cluster/src/main/java/com/cloud/cluster/ClusterManagerImpl.java

---------

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2025-03-27 16:47:12 +05:30
Bernardo De Marco Gonçalves 7f3f104295
add UI support for filtering ISOs by account (#10488) 2025-03-25 11:27:13 +01:00
Imvedansh 8a338ea12c
In Install.md->CloudStack UI Commands(npm) (#10593) 2025-03-25 11:25:04 +01:00
dahn 9a3fa89e32
remove trailing white space 2025-03-25 08:46:26 +01:00
Daniel Gruno a521985662
[Infra] reset collaborators list 2025-03-20 15:18:27 +01:00
Daniel Gruno e6b2df2e0f
[Infra] reset collaborators 2025-03-20 15:17:49 +01:00
Suresh Kumar Anaparti 9dceae4614
MS maintenance improvements (#10417)
* Update last agents during ms maintenance, and some code improvements

* Send 503 (Service Unavailable) response status when maintenance or shutdown is initiated
[Any load balancer in the clustered environment can avoid routing requests to this MS node]

* Migrate systemvm agents before routing host agents, and some code improvements

* Added events for ms maintenance and shutdown operations

* Added the following ms maintenance and shutdown improvements

- block new agent connections during prepare for maintenance of ms

- maintain avoids ms list

- propagate updated management servers list and lb algorithm in host and indirect.agent.lb.algorithm settings respectively, to systemvm (non-routing) agents

- updated setup ms list and migrate agent connections to executor service

- migrate agent connection through executor, and send the answer to the ms host that initiated the migration

- re-initialize ssl handshake executor if it is shutdown

- don't allow prepare for maintenance or shutdown when other management server nodes are in preparing states

- don't allow trigger shutdown when management server is up and other management server nodes are in preparing states

- stop agent connections monitor on ms maintenance

- update avoid ms list in ready command

- updated connected host from the client connection

- update last agents in ms metrics from the database

- updated some agent config descriptions

- update last management server in the hosts during shutdown

- added agents and lastagents in management server response

- updated management server maintenance & shutdown unit tests

- some code improvements

* refactored code / addressed comments

* removed shutdown testcase (maybe, calling System.exit)

* Revert "removed shutdown testcase (maybe, calling System.exit)"

This reverts commit e14b071715.

* avoid system.exit during shutdown test

* code improvements

* testcase fix

* Fix cutoff time in agent connections monitor thread
2025-03-19 14:18:05 +05:30
Pearl Dsilva ea36568e47 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-03-17 17:17:43 -04:00
Pearl Dsilva 1732f676db Merge branch '4.20' of https://github.com/apache/cloudstack 2025-03-17 13:26:50 -04:00
Daan Hoogland 9c6f2a9e14 Merge release branch 4.20 to main
* 4.20:
  Fix Stats Collector to not divide by zero (#10492)
  linstor: try to delete -rst resource before snapshot backup (#10443)
2025-03-12 11:31:56 +01:00
Pearl Dsilva b387bc1664 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-03-10 09:34:52 -04:00
Thomas O'Dowd d94aaa8b59
Add Cloudian HyperStore Object Storage (#9748) 2025-03-10 07:38:40 +01:00
Abhishek Kumar 1c1dad977e Merge remote-tracking branch 'apache/4.20' 2025-03-06 09:55:27 +05:30
Lucas Martins eab37eca43
Change L2 network offering form to not require a compute offering (#10389)
* Change L2 offering form to not require a compute offering

* apply bernado's suggestion

Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>

---------

Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
2025-03-03 11:26:21 -05:00
Rohit Yadav 69cf299c62 Merge remote-tracking branch 'origin/4.20'
Signed-off-by: Rohit Yadav <rohit@yadav.cloud>
2025-02-28 10:42:04 +05:30
Pearl Dsilva 3a28a87483 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-02-27 11:20:25 -05:00
dahn 48f890a693
resolve merge problems in the backup framework (#10457)
Co-authored-by: Wei Zhou <weizhou@apache.org>
2025-02-26 14:12:40 +01:00
Daan Hoogland 24b7c66251 Merge branch '4.20' 2025-02-24 14:33:12 +01:00
Nicole Schmidt a8b18a5394
Add nicoschmdt as a project collaborator (#10422) 2025-02-19 13:46:22 +01:00
GaOrtiga 864751d5f9
Fix ordering of secondary storages with the algorithm `firstfitleastconsumed` (#8557)
* Fix ordering of secondary storages with the algorithm `firstfitleastconsumed`

* return store without checking all

* Add unit tests

---------

Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2025-02-14 08:33:04 -03:00
Lucas Martins 617fee8416
Add `offerHa` and `forceHa` preset variables to `RUNNING_VM` usage type (#9500)
* Add offerHA and forceHa presets to Running VM

* apply winterhazel's suggestion

Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

* Add ObjectUtils import

---------

Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2025-02-14 08:32:51 -03:00
Lucas Martins a093f00ab5
Add IOPS and bytes preset variables to `VOLUME` usage type (#10326)
* Add bytes and iops preset variables to volume usage type

* Add new line at the end of file

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

* Change disk offering preset variable class name

---------

Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2025-02-14 08:28:06 -03:00
Abhisar Sinha 2a4a1f73d0
Support multi-scope configuration settings (#10300)
This PR introduces the concept of multi-scope configuration settings. In addition to the Global level, currently all configurations can be set at a single scope level.
It will be useful if a configuration can be set at multiple scopes. For example, a configuration set at the domain level
will apply for all accounts, but it can be set for an account as well. In which case the account level setting will override the domain level setting.

This is done by changing the column `scope` of table `configuration` from string (single scope) to bitmask (multiple scopes).

```
public enum Scope {
    Global(null, 1),
    Zone(Global, 1 << 1),
    Cluster(Zone, 1 << 2),
    StoragePool(Cluster, 1 << 3),
    ManagementServer(Global, 1 << 4),
    ImageStore(Zone, 1 << 5),
    Domain(Global, 1 << 6),
    Account(Domain, 1 << 7);
```
Each scope is also assigned a parent scope. When a configuration for a given scope is not defined but is available for multiple scope types, the value will be retrieved from the parent scope. If there is no parent scope or if the configuration is defined for a single scope only, the value will fall back to the global level.

Hierarchy for different scopes is defined as below :
- Global
    - Zone
        - Cluster
            - Storage Pool
        - Image Store
    - Management Server
    - Domain
        - Account

This PR also updates the scope of the following configurations (Storage Pool scope is added in addition to the existing Zone scope):
- pool.storage.allocated.capacity.disablethreshold
- pool.storage.allocated.resize.capacity.disablethreshold
- pool.storage.capacity.disablethreshold

Doc PR : https://github.com/apache/cloudstack-documentation/pull/476

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-02-14 11:25:01 +05:30
GaOrtiga f8563b86e7
Fix NPE during kubernetes cluster creation when network has rules with ports saved as null on DB (#9223)
Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2025-02-13 10:25:16 +01:00
Daan Hoogland 0dcb8da03a Merge branch '4.20' 2025-02-12 16:54:05 +01:00
Lucas Martins 0a92cc0349
UI: Add VM state to Volume list view (#10341)
* Add vm state to volume list view

* Change size column order

---------

Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
2025-02-12 11:50:58 -03:00
Abhisar Sinha a7beaaf73b
Add Resource Limits to Backups and Object Storage (#10017)
Doc PR : https://github.com/apache/cloudstack-documentation/pull/461
This PR fixes https://github.com/apache/cloudstack/issues/8638

== Description

Four new Resource Types have been added. Admin can configure corresponding resource limits for the tenants at different levels (domain, account, project) 
User dashboard's Storage section will show the new resources, their limits and current usage.

1. backup - No. of backups used by the account
2. backup_storage - Backup storage allocated for the account
3. bucket - No. of buckets used by the accounts
4. object_storage - Object storage allocated for the account.

Some other related changes done to BnR framework:

1. Maximum number of Backups to retain can be specified while creating Backup schedules, similar to Scheduled snapshots.
2. Oldest Scheduled backup of the same interval type will be deleted once the number reaches the configured max Backups value.
3. Code refactor: Moved syncBackups method from BackupProvider to the framework BackupManagerImpl, as it is a common functionality and all providers were using duplicated code.

Changes done to the Object Storage Framework

1. Quota parameter is made mandatory while creating a bucket. Bucket quota is considered to be the allocated space and will be used to enforce Resource limits.

== Schema Changes:

1. New Column `max_backups` added to `backup_schedule` table
4. New Column `backup_interval_type` added to `backups` table

== Api Changes:

1. createBackup: new Parameter `scheduleid`. It should be specified whenever a scheduled backup is created. This will translate to the `backup_interval_type` in the `backups` table.
3. createBackupScheduke: new Parameter `max_backups`. To specify maximum number of backups to retain for the given schedule.

== Configurations:

|Setting |Scope |Default Value |Description|
|-------|--------|--------------|-----------|
|backup.max.hourly |Global |8 |Maximum recurring hourly backups to be retained for an instance|
|backup.max.daily |Global |8 |Maximum recurring daily backups to be retained for an instance|
|backup.max.weekly |Global |8 |Maximum recurring weekly backups to be retained for an instance|
|backup.max.monthly |Global |8 |Maximum recurring monthly backups to be retained for an instance|
|max.account.backups| Global| 20 | The default maximum number of backups that can be created for an account|
|max.account.backup.storage| Global| 400 | The default maximum backup storage space (in GiB) that can be used for an account|
|max.domain.backups| Global| 40 | The default maximum number of backups that can be created for an domain|
|max.domain.backup.storage| Global| 800 | The default maximum backup storage space (in GiB) that can be used for an domain|
|max.project.backups| Global| 20 | The default maximum number of backups that can be created for an project|
|max.project.backup.storage| Global| 400 | The default maximum backup storage space (in GiB) that can be used for an project|

|Setting |Scope |Default Value |Description|
|-------|--------|--------------|-----------|
|max.account.buckets| Global| 20 | The default maximum number of buckets that can be created for an account|
|max.account.object.storage| Global| 400 | The default maximum object storage space (in GiB) that can be used for an account|
|max.domain.buckets| Global| 40 | The default maximum number of buckets that can be created for an domain|
|max.domain.object.storage| Global| 800 | The default maximum object storage space (in GiB) that can be used for an domain|
|max.project.buckets| Global| 20 | The default maximum number of buckets that can be created for an project|
|max.project.object.storage| Global| 400 | The default maximum object storage space (in GiB) that can be used for an project|


Co-authored-by: Daan Hoogland <daan@onecht.net>
Co-authored-by: Lucas Martins <56271185+lucas-a-martins@users.noreply.github.com>
Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2025-02-07 16:56:20 +05:30
Manoj Kumar 648170cf9b
Fix lint error coming up in main (#10342) 2025-02-07 09:32:44 +01:00
Rohit Yadav 2ef16132ee Merge remote-tracking branch 'origin/4.20' 2025-02-05 13:29:23 +05:30
Daniel Augusto Veronezi Salvador 22c71928dd
Change debian packages maintainer (#10321) 2025-02-04 10:19:56 +01:00
dahn cd81398cb7
removing inactive collaborators from .asf.yaml (#10298) 2025-02-03 13:54:07 +01:00
Daan Hoogland 2654890e86 Merge branch '4.20' 2025-02-01 21:20:08 +01:00
Abhishek Kumar 7abda3b963 Merge remote-tracking branch 'apache/4.20' 2025-01-31 16:55:38 +05:30
Pearl Dsilva 4cf6fc95f2
Revert Holiday season Apache logo (#10302) 2025-01-30 22:08:39 +01:00
niyamsw 5df15a7aa6
KVM/s390x Support: Add support for KVM on s390x architecture (#10038)
Signed-off-by: Niyam Siwach <niyam@ibm.com>
Signed-off-by: Himanshu Mishra <Himanshu.Mishra2@ibm.com>
2025-01-29 17:34:16 +01:00
Nicole Schmidt 398ffc3b2c
Add preset variable account created (#10200) 2025-01-29 09:31:17 +01:00
Suresh Kumar Anaparti 3b108b968f
Support for Management Server Maintenance Mode (#9854)
* Support for Management Server Maintenance

- New APIs: prepareForMaintenance and cancelMaintenance, with required parameter - managementserverid.

- New management server states for maintenance: PreparingForMaintenance, Maintenance.

- listHosts API with optional parameter – managementserverid, to list the hosts connected to the management server.

- Support management server maintenance when more than one active management servers available.

- Triggers transfer agents to other available management servers for maintenance, new agent command MigrateAgentConnectionCommand to initiate transfer of indirect agents.

- New global config 'management.server.maintenance.timeout', to set the timeout (in mins) for the management server maintenance window, default: 60 mins.

- UI changes: Prepare and Cancel Maintenance in Management Server section, Connected Agents tab, New fields for hosts and management servers.

* Updated pending jobs check timer task with ScheduledExecutorService

* keep maintenance state on trigger shutdown call when ms is in maintenance

* add pending jobs count to ms response

* during ms heartbeat, update state to up only when it's down

* allow vm work jobs of async job created before prepare for maintenance

* Revert "keep maintenance state on trigger shutdown call when ms is in maintenance"

This reverts commit 607e13364679eac897f4d146bb3325ea7a61ba17.

* skip maintenance test when multiple management servers are not available, and not configured in host setting for kvm
2025-01-29 13:31:15 +05:30
Daan Hoogland 048649d351 Merge release branch 4.20 to main
* 4.20:
  server: investigate pending HA work when executing in new MS session (#10167)
  extra null guard (#10264)
2025-01-28 14:34:19 +01:00
Lucas Martins 789e269940
Add lucas-a-martins as a project collaborator (#10283)
Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
2025-01-28 08:14:22 +01:00
Daan Hoogland 98f5663954 Merge branch '4.20' 2025-01-24 17:10:43 +01:00
Daan Hoogland 81e052cfeb Merge release branch 4.20 to main
* 4.20:
  linstor: Fix ZFS snapshot backup (#10219)
  fix listing of VMs by network (#10204)
  Configure org.eclipse.jetty.server.Request.maxFormKeys from server.properties and increase the default value (#10214)
  api: fix access for listSystemVmUsageHistory (#10032)
  Fix NPE issues during host rolling maintenance, due to host tags and custom constrained/unconstrained service offering (#9844)
2025-01-21 12:00:19 +01:00
dahn 1c626c884c
Update bug.yml 2025-01-20 17:06:59 +01:00
Daan Hoogland ecd60a4e46 Merge release branch 4.20 to main
* 4.20:
  Maintenance mode: Add host to deployment planner avoid list to fix local storage vm migration (#9892)
  Add project-user association normalization script to 4.20.1 upgrade (#10116)
  fix slider component for global settings of the range type (#10187)
  Clean up network permissions on account deletion (#10176)
2025-01-20 11:58:28 +01:00
dahn 0ed6895db4
feature and bug templates (#10186) 2025-01-17 11:41:25 +01:00
Fabricio Duarte 449d3c7cb1
Create API to list Quota credits (#9590)
Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
2025-01-16 15:19:32 +01:00
Daan Hoogland 0c13ded943 Merge release branch 4.20 to main
* 4.20:
  Rollback of changes with errors during the VM assign (#7061)
  [VMware] Consider CD/DVD drive when calculating next free unit number for volume attachment over IDE controller (#9644)
  consider a valid ipv4 address as a validish ipv4 /32 cidr (#10174)
2025-01-15 17:52:07 +01:00
Wido den Hollander baad8ddc91
network: Add BGP+EVPN+VXLAN script to main repository and Agent package (#9778)
This script can be used to use BGP+EVPN for VXLAN instead of multicast.

In order to use the script operators need to manually create a symlink:

cd /usr/share
ln -s modifyvxlan.sh cloudstack-common/scripts/vm/network/vnet/modifyvxlan-evpn.sh

Configuring BGP and EVPN is outside of the scope of CloudStack and is
up to the operator to configure.

This commit just adds this script to the main repository and does not
change any existing functionality.
2025-01-13 15:38:11 +01:00
Daan Hoogland bd874eaa44 Merge release branch 4.20 to main
* 4.20:
  systemvm: fix keystore is reset when patch a systemvm (#9900)
  no retrieval of null hosts (#10175)
  upgrade: consider multiple hypervisors and secondary storages (#10046)
  CheckOnHostCommand: add missing timeout setting (#9677)
2025-01-13 11:23:51 +01:00
Daan Hoogland fadb39ece7 Merge release branch 4.20 to main
* 4.20:
  merge errors fixed
  Restrict the migration of volumes attached to VMs in Starting state (#9725)
  server, plugin: enhance storage stats for IOPS (#10034)
  Introducing granular command timeouts global setting (#9659)
  Improve logging to include more identifiable information (#9873)
2025-01-08 14:01:19 +01:00
dahn d1cf45365a
Revert "pre-commit: add hook `check-yaml` (#9133)" (#10161)
This reverts commit 57867dc6b0.
2025-01-06 12:21:26 +01:00
Daan Hoogland 30b2588c06 Merge release branch 4.20 to main
* 4.20:
  log name change after merge forward
  check tags while fetching storage pool for importing vm (#9764)
  UI: Add cluster arch type to the zone creation wizard (#10080)
2025-01-03 10:17:28 +01:00
John Bampton 5bae1188ff
pre-commit fix mixed line endings in XML files (#10148)
https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#mixed-line-ending
2025-01-03 09:42:09 +01:00
John Bampton 0f3ea8ceb2
Add pre-commit hook `fix-byte-order-marker` (#10147)
https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#fix-byte-order-marker
2025-01-03 09:40:43 +01:00
John Bampton 2b070880c1
pre-commit check `.cfg` files with the trailing whitespace hook (#10151)
https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#trailing-whitespace

This hook auto trims trailing whitespace
2025-01-03 09:39:16 +01:00
John Bampton fd24509ba7
pre-commit: fix `.cs` files with the `trailing-whitespace` hook (#9794)
Co-authored-by: Vishesh <vishesh92@gmail.com>
2024-12-31 13:17:10 +01:00
John Bampton 0128046429
pre-commit update markdownlint; enable rules MD009,MD019; fix license header (#10145)
https://github.com/DavidAnson/markdownlint/blob/main/doc/md009.md

https://github.com/DavidAnson/markdownlint/blob/main/doc/md019.md
2024-12-31 13:02:16 +01:00
John Bampton 0b66f5a86a
pre-commit: remove trailing-whitespace from more file types (#10131) 2024-12-31 14:55:24 +05:30
John Bampton 57867dc6b0
pre-commit: add hook `check-yaml` (#9133)
https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#check-yaml
2024-12-31 09:32:32 +01:00
Daan Hoogland 2daffa34f2 Merge release branch 4.20 to main
* 4.20:
  VR: fix site-2-site VPN if split connections is enabled (#10067)
  UI: fix cannot open 'Edit tags' modal for static routes (#10065)
  Update ownership selection component to be language independent (#10052)
  Support to enable/disable VM High Availability manager and related alerts (#10118)
2024-12-30 13:35:30 +01:00
John Bampton b48de4e023
pre-commit: enable `markdownlint` rule `MD018` (#9134)
https://github.com/DavidAnson/markdownlint/blob/main/doc/md018.md

Co-authored-by: dahn <daan@onecht.net>
2024-12-27 12:28:24 +01:00
John Bampton 6a2c7b0220
pre-commit: enable markdownlint rule `MD012` (#9364)
MD012 no-multiple-blanks - Multiple consecutive blank lines

https://github.com/DavidAnson/markdownlint/blob/main/doc/md012.md
2024-12-27 10:25:11 +01:00
Pearl Dsilva 631bba279b
README: it's that time of the year! (#10125) 2024-12-24 17:02:14 +05:30
Daan Hoogland 0b2952ca43 Merge release branch 4.20 to main
* 4.20:
  Add ownership selection to VPC form (#10124)
2024-12-23 11:58:50 +01:00
John Bampton ee893d1202
Clean up Python code; Python `2` to `3` (#8993) 2024-12-23 10:11:51 +01:00
Daan Hoogland b1ba9bf626 text in echo change in git-pr 2024-12-20 16:45:01 +01:00
Daan Hoogland 9295a1624d Merge release branch 4.20 to main
* 4.20:
  VR: apply iptables rules when add/remove static routes (#10064)
  Certificate and VM hostname validation improvements (#10051)
  set ulimit for server according to redhat spec (#10040)
  kvm-storage: provide isVMMigrate information to storage plugins (#10093)
  Allow config drive deletion of migrated VM, on host maintenance (#10045)
  linstor: improve heartbeat check with also asking linstor (#10105)
  server: simplify role change validation (#9173)
  UI: create VPC network offering with conserve mode (#10082)
  server: fix typo removeaccessvpn in VirtualRouterElement (#10086)
  UI: remove duplicated Instance Name in Public IP details page (#10087)
  UI: Fixes in the Usage UI (#10000)
  SAML2: add cookie with HttpOnly too #10013 (#10047)
  ui: Allow font-awesome icon usage and optimise icon size inconsistency (#9744)
2024-12-20 14:37:49 +01:00
Bernardo De Marco Gonçalves 73c3339bf1
List users by their authentication source (#10115) 2024-12-19 14:12:55 +01:00
Ruben Bosch 54bc150140
fix typo in SnapshotManager.java (#10104) 2024-12-14 17:56:40 +01:00
Fabricio Duarte 91ab67c952
Add logs to VMware instance configuration process (#9080)
Co-authored-by: Henrique Sato <henriquesato2003@gmail.com>
2024-12-12 13:26:56 +01:00
Bernardo De Marco Gonçalves f75a194c09
Persist IP addresses related to VM access via CPVM (#9534) 2024-12-10 11:43:17 +01:00
Rohit Yadav c94d0abab4 Merge remote-tracking branch 'origin/4.20' 2024-12-09 11:38:19 +05:30
Rohit Yadav cb530c1749 Merge remote-tracking branch 'origin/4.20' 2024-12-09 11:36:40 +05:30
Daan Hoogland 27d2de180f Merge release branch 4.20 to main
* 4.20:
  move upgrade code to the right file (#10036)
2024-12-04 14:31:20 +01:00
Daan Hoogland 97f9e8e816 Merge release branch 4.20 to main
* 4.20:
  move sql code to the right file (#10035)
2024-12-04 14:29:42 +01:00
Daan Hoogland 205ebfb8b5 Merge release branch 4.20 to main
* 4.20:
  UI: Fix userdata and load balancer selection (#10016)
  Prevent password updates for SAML and LDAP users (#9999)
  cloudstack-migrate-databases: sql AND added (#10033)
  engine/schema: move SQLs to 4.20.0 to 4.20.1 upgrade (#10018)
  Remove user from project before deletion (#10008)
  Simplify validation for creating volume templates via UI (#9828)
2024-12-04 13:05:32 +01:00
Henrique Sato 4ac4d9cf29
API to validate Quota activation rule (#9605)
* API to validate Quota activation rule

* Apply suggestions from code review

Co-authored-by: Bryan Lima <42067040+BryanMLima@users.noreply.github.com>

* Use constants

---------

Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
Co-authored-by: Bryan Lima <42067040+BryanMLima@users.noreply.github.com>
2024-12-03 14:41:25 -03:00
Daan Hoogland 9b6f9b5f7d Merge release branch 4.20 to main
* 4.20:
  UI: Tooltip on the host information card to display the CPU speed in MHz and the memory value in MB (to 3 decimal places) (#9971)
  UI: Allow accounts of the `User` type to add other accounts or users to projects through UI (#9927)
  enable to create VPC portfowarding rules with source cidr (#7081)
  Add new column `last_id` to the table volumes (#9759)
  Allow VMWare import via another host (#9787)
  Linstor: add support for ISO block devices and direct download (#9792)
  get expunged VM data for job result (#9949)
  fix section divider display on auth page (#9966)
2024-12-03 16:33:51 +01:00
Wei Zhou da94ae2c1c
Merge remote-tracking branch 'apache/4.20' 2024-12-03 09:44:42 +01:00
Abhisar Sinha ef6c0c443d
Prepend VPC name to VPC network tier name (#9780)
* Fix `updateTemplatePermission` when the UI is set to a language other than English (#9766)

* Fix updateTemplatePermission UI in non-english language

* Improve fix

---------

Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>

* Prepend vpc name to vpc tier network name based on global setting

* Added UT for createVpcGuestNetwork

* rename connector to delimiter and add configKey.Category.Network

* Move setting the name to a new method

---------

Co-authored-by: Daan Hoogland <daan@onecht.net>
Co-authored-by: Lucas Martins <56271185+lucas-a-martins@users.noreply.github.com>
Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
2024-12-03 12:06:00 +05:30
Bernardo De Marco Gonçalves 546ef31aed
UI: Add UI support for `forvpc` and `guestiptype` parameters of the `listNetworkOfferings` API (#9947)
* add guestiptype and forvpc filters for listNetworkOfferings on UI

* fix duplicate option names on list filters
2024-11-29 09:05:39 -03:00
Abhisar Sinha db2e89a3a2
UI: make a newly added Network the default one (#9708)
* UI: Checkbox to make a newly added Network the default one in the Instance's Network tab

* Fixed an issue that was causing exit from network tab after add-network
2024-11-28 14:53:28 -03:00
Layon 528fca2f17
Added-cpu-core-and-memory-range-fot-type-offers-CustomConstrained (#9930)
* Added-cpu-core-and-memory-range-fot-type-offers-CustomConstrained

* Update ui/src/components/view/ListView.vue

Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

* Update ui/src/components/view/ListView.vue

Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

---------

Co-authored-by: layon.oliveira <layon.oliveira@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2024-11-28 14:42:55 -03:00
kiranchavala 26095e28de
Add support for telugu language (#9956)
* added support for telugu langugae

* fixed typo  telugu language

* Update ui/public/locales/te.json

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

---------

Co-authored-by: dahn <daan.hoogland@gmail.com>
2024-11-28 14:42:07 -03:00
João Jandre d9774a8462 Updating pom.xml version numbers for release 4.21.0.0-SNAPSHOT
Signed-off-by: João Jandre <48719461+JoaoJandre@users.noreply.github.com>
2024-11-27 11:47:06 -03:00
3521 changed files with 308026 additions and 130838 deletions

View File

@ -50,21 +50,16 @@ github:
rebase: false rebase: false
collaborators: collaborators:
- acs-robot - ingox
- rajujith
- GaOrtiga
- SadiJr
- winterhazel
- gpordeus - gpordeus
- hsato03 - erikbocks
- bernardodemarco - Imvedansh
- abh1sar - Damans227
- FelipeM525
protected_branches: ~ protected_branches: ~
notifications: notifications:
commits: commits@cloudstack.apache.org commits: commits@cloudstack.apache.org
issues: commits@cloudstack.apache.org issues: commits@cloudstack.apache.org
pullrequests: commits@cloudstack.apache.org pullrequests: commits@cloudstack.apache.org
discussions: users@cloudstack.apache.org discussions: users@cloudstack.apache.org

20
.codespellrc Normal file
View File

@ -0,0 +1,20 @@
# 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.
[codespell]
ignore-words = .github/linters/codespell.txt
skip = systemvm/agent/noVNC/*,ui/package.json,ui/package-lock.json,ui/public/js/less.min.js,ui/public/locales/*.json,server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest.java,test/integration/smoke/test_ssl_offloading.py

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
.github/workflows/*.lock.yml linguist-generated=true merge=ours

25
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,25 @@
# 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.
/plugins/storage/volume/linstor @rp-
/plugins/storage/volume/storpool @slavkap
/plugins/storage/volume/ontap @rajiv1 @sandeeplocharla @piyush5 @suryag
.pre-commit-config.yaml @jbampton
/.github/linters/ @jbampton
/plugins/network-elements/nsx/ @Pearl1594 @nvazquez

46
.github/ISSUE_TEMPLATE/bug.yml vendored Normal file
View File

@ -0,0 +1,46 @@
# 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.
description: "Thank you for reporting a bug!"
name: bug
title: "[SHORT PROBLEM DESCRIPTION]"
labels: bug, needs-triageing
body:
- type: markdown
attributes:
value: "## Welcome, please describe your problem below;"
- type: textarea
attributes:
label: problem
value: The long description of your problem
- type: markdown
attributes:
value: "## What versions of cloudstack and any infra components are you using"
- type: textarea
attributes:
label: versions
value: The versions of ACS, hypervisors, storage, network etc..
- type: textarea
attributes:
label: The steps to reproduce the bug
value: |
1.
2.
3.
...
- type: textarea
attributes:
label: "What to do about it?"

View File

@ -0,0 +1,25 @@
# 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.
description: "Thank you for your new feature idea!"
name: feature
title: "[SHORT FUNCTIONAL DESCRIPTION]"
labels: new
body:
- type: textarea
attributes:
label: "The required feature described as a wish"
value: As a User/Admin/Operator I would like to , ... have the system make my morning coffee.

5
.github/aw/imports/.gitattributes generated vendored Normal file
View File

@ -0,0 +1,5 @@
# Mark all cached import files as generated
* linguist-generated=true
# Use 'ours' merge strategy to keep local cached versions
* merge=ours

View File

@ -0,0 +1,73 @@
---
# Report formatting guidelines
---
## Report Structure Guidelines
### 1. Header Levels
**Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
When creating GitHub issues or discussions:
- Use `###` (h3) for main sections (e.g., "### Test Summary")
- Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
### 2. Progressive Disclosure
**Wrap detailed test results in `<details><summary><b>Section Name</b></summary>` tags to improve readability and reduce scrolling.**
Use collapsible sections for:
- Verbose details (full test logs, raw data)
- Secondary information (minor warnings, extra context)
- Per-item breakdowns when there are many items
Always keep critical information visible (summary, critical issues, key metrics).
### 3. Report Structure Pattern
1. **Overview**: 1-2 paragraphs summarizing key findings
2. **Critical Information**: Show immediately (summary stats, critical issues)
3. **Details**: Use `<details><summary><b>Section Name</b></summary>` for expanded content
4. **Context**: Add helpful metadata (workflow run, date, trigger)
### Design Principles (Airbnb-Inspired)
Reports should:
- **Build trust through clarity**: Most important info immediately visible
- **Exceed expectations**: Add helpful context like trends, comparisons
- **Create delight**: Use progressive disclosure to reduce overwhelm
- **Maintain consistency**: Follow patterns across all reports
### Example Report Structure
```markdown
### Summary
- Key metric 1: value
- Key metric 2: value
- Status: ✅/⚠️/❌
### Critical Issues
[Always visible - these are important]
<details>
<summary><b>View Detailed Results</b></summary>
[Comprehensive details, logs, traces]
</details>
<details>
<summary><b>View All Warnings</b></summary>
[Minor issues and potential problems]
</details>
### Recommendations
[Actionable next steps - keep visible]
```
## Workflow Run References
- Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- Include up to 3 most relevant run URLs at end under `**References:**`
- Do NOT add footer attribution (system adds automatically)

41
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,41 @@
# 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.
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
open-pull-requests-limit: 2
schedule:
interval: "weekly"
groups:
github-actions-dependencies:
patterns:
- "*"
cooldown:
default-days: 7
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 7

View File

@ -18,36 +18,21 @@
# MD001/heading-increment Heading levels should only increment by one level at a time # MD001/heading-increment Heading levels should only increment by one level at a time
MD001: false MD001: false
# MD003/heading-style Heading style
MD003: false
# MD004/ul-style Unordered list style # MD004/ul-style Unordered list style
MD004: false MD004: false
# MD007/ul-indent Unordered list indentation # MD007/ul-indent Unordered list indentation
MD007: false MD007: false
# MD009/no-trailing-spaces Trailing spaces
MD009: false
# MD010/no-hard-tabs Hard tabs # MD010/no-hard-tabs Hard tabs
MD010: false MD010: false
# MD012/no-multiple-blanks Multiple consecutive blank lines
MD012: false
# MD013/line-length Line length # MD013/line-length Line length
MD013: false MD013: false
# MD014/commands-show-output Dollar signs used before commands without showing output # MD014/commands-show-output Dollar signs used before commands without showing output
MD014: false MD014: false
# MD018/no-missing-space-atx No space after hash on atx style heading
MD018: false
# MD019/no-multiple-space-atx Multiple spaces after hash on atx style heading
MD019: false
# MD022/blanks-around-headings Headings should be surrounded by blank lines # MD022/blanks-around-headings Headings should be surrounded by blank lines
MD022: false MD022: false
@ -98,3 +83,6 @@ MD046: false
# MD052/reference-links-images Reference links and images should use a label that is defined # MD052/reference-links-images Reference links and images should use a label that is defined
MD052: false MD052: false
# MD059/descriptive-link-text Link text should be descriptive
MD059: false

32
.github/linters/.yamllint.yml vendored Normal file
View File

@ -0,0 +1,32 @@
# 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.
---
extends: default
rules:
line-length:
max: 400 # Very forgiving for GitHub Actions and infrastructure files
indentation: disable # Disable indentation checking for existing files
comments: disable # Disable comment formatting checks
braces: disable
brackets: disable # Disable bracket spacing checks
colons:
max-spaces-after: -1 # Allow any number of spaces after colon
max-spaces-before: 0
document-start: disable # Many files don't have ---
truthy:
allowed-values: ['true', 'false', 'on', 'off', 'yes', 'no']

View File

@ -4,6 +4,7 @@ acount
actuall actuall
acuiring acuiring
acumulate acumulate
addin
addreess addreess
addtion addtion
adminstrator adminstrator
@ -12,10 +13,8 @@ afrer
afterall afterall
againt againt
ags ags
aktive
algoritm algoritm
allo allo
alloacate
allocted allocted
alocation alocation
alogrithm alogrithm
@ -65,6 +64,7 @@ bject
boardcast boardcast
bootstraper bootstraper
bu bu
callin
cant cant
capabilites capabilites
capablity capablity
@ -73,6 +73,7 @@ carrefully
cavaet cavaet
chaing chaing
checkd checkd
checkin
childs childs
choosen choosen
chould chould
@ -93,7 +94,6 @@ confg
configruation configruation
configuable configuable
conneciton conneciton
connexion
constrait constrait
constraits constraits
containg containg
@ -101,9 +101,7 @@ contex
continuesly continuesly
contro contro
controler controler
controles
controll controll
convienient
convinience convinience
coputer coputer
correcponding correcponding
@ -158,13 +156,13 @@ differnet
differnt differnt
direcotry direcotry
directroy directroy
disale
disbale disbale
discrepency discrepency
disover disover
dissapper dissapper
dissassociated dissassociated
divice divice
dockin
doesn' doesn'
doesnot doesnot
doesnt doesnt
@ -175,7 +173,6 @@ eanbled
earch earch
ect ect
elemnt elemnt
eles
elments elments
emmited emmited
enble enble
@ -183,29 +180,23 @@ encryted
enebled enebled
enmpty enmpty
entires entires
enviornment
environmnet environmnet
equivalant equivalant
erro erro
erronous erronous
everthing
everytime everytime
excetion
excption
excute excute
execept execept
execption execption
exects
execut execut
executeable executeable
exeeded exeeded
exisitng exisitng
exisits exisits
existin
existsing existsing
exitting
expcted expcted
expection expection
explaination
explicitely explicitely
faield faield
faild faild
@ -218,7 +209,6 @@ fillled
findout findout
fisrt fisrt
fo fo
folowing
fowarding fowarding
frist frist
fro fro
@ -237,6 +227,7 @@ hanling
happend happend
hasing hasing
hasnt hasnt
havin
hda hda
hostanme hostanme
hould hould
@ -256,20 +247,14 @@ implmeneted
implmentation implmentation
incase incase
includeing includeing
incosistency
indecates indecates
indien
infor infor
informations informations
informaton informaton
infrastrcuture
ingore ingore
inital
initalize initalize
initator initator
initilization
inspite inspite
instace
instal instal
instnace instnace
intefaces intefaces
@ -287,12 +272,8 @@ ist
klunky klunky
lable lable
leve leve
lief
limite limite
linke
listner listner
lokal
lokales
maintainence maintainence
maintenace maintenace
maintenence maintenence
@ -301,7 +282,6 @@ mambers
manaully manaully
manuel manuel
maxium maxium
mehtod
mergable mergable
mesage mesage
messge messge
@ -311,7 +291,6 @@ minumum
mis mis
modifers modifers
mor mor
mot
mulitply mulitply
multipl multipl
multple multple
@ -325,7 +304,7 @@ nin
nodel nodel
nome nome
noone noone
nowe notin
numbe numbe
numer numer
occured occured
@ -378,6 +357,7 @@ propogate
provison provison
psudo psudo
pyhsical pyhsical
re-use
readabilty readabilty
readd readd
reccuring reccuring
@ -392,12 +372,9 @@ remaning
remore remore
remvoing remvoing
renabling renabling
repeatly
reponse reponse
reqest reqest
reqiured reqiured
requieres
requried
reserv reserv
reserverd reserverd
reseted reseted
@ -414,17 +391,15 @@ retriving
retrun retrun
retuned retuned
returing returing
re-use
rever rever
rocessor rocessor
roperty
runing runing
runnign runnign
sate sate
scalled scalled
scipt
scirpt scirpt
scrip scrip
seconadry
seconday seconday
seesion seesion
sepcified sepcified
@ -437,12 +412,10 @@ settig
sevices sevices
shoul shoul
shoule shoule
sie
signle signle
simplier simplier
singature singature
skiping skiping
snaphsot
snpashot snpashot
specied specied
specifed specifed
@ -453,7 +426,6 @@ standy
statics statics
stickyness stickyness
stil stil
stip
storeage storeage
strat strat
streched streched
@ -462,7 +434,6 @@ succesfull
successfull successfull
suceessful suceessful
suces suces
sucessfully
suiteable suiteable
suppots suppots
suppport suppport
@ -495,7 +466,6 @@ uncompressible
uneccessarily uneccessarily
unexepected unexepected
unexpect unexpect
unknow
unkonw unkonw
unkown unkown
unneccessary unneccessary
@ -503,14 +473,12 @@ unparseable
unrecoginized unrecoginized
unsupport unsupport
unxpected unxpected
updat
uptodate uptodate
usera usera
usign usign
usin usin
utlization utlization
vaidate vaidate
valiate
valule valule
valus valus
varibles varibles
@ -519,8 +487,6 @@ verfying
verifing verifing
virutal virutal
visable visable
wakup
wil wil
wit wit
wll
wth wth

View File

@ -30,18 +30,17 @@ jobs:
build: build:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Set up JDK 11 - name: Set up JDK 17
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
java-version: '11' distribution: 'temurin'
distribution: 'adopt' java-version: '17'
architecture: x64 cache: 'maven'
cache: maven
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v6
with: with:
python-version: '3.10' python-version: '3.10'
architecture: 'x64' architecture: 'x64'

View File

@ -89,7 +89,10 @@ jobs:
smoke/test_nested_virtualization smoke/test_nested_virtualization
smoke/test_set_sourcenat smoke/test_set_sourcenat
smoke/test_webhook_lifecycle smoke/test_webhook_lifecycle
smoke/test_purge_expunged_vms", smoke/test_purge_expunged_vms
smoke/test_extension_lifecycle
smoke/test_extension_custom_action_lifecycle
smoke/test_extension_custom",
"smoke/test_network "smoke/test_network
smoke/test_network_acl smoke/test_network_acl
smoke/test_network_ipv6 smoke/test_network_ipv6
@ -137,11 +140,13 @@ jobs:
smoke/test_vm_deployment_planner smoke/test_vm_deployment_planner
smoke/test_vm_strict_host_tags smoke/test_vm_strict_host_tags
smoke/test_vm_schedule smoke/test_vm_schedule
smoke/test_deploy_vgpu_enabled_vm
smoke/test_vm_life_cycle smoke/test_vm_life_cycle
smoke/test_vm_lifecycle_unmanage_import smoke/test_vm_lifecycle_unmanage_import
smoke/test_vm_snapshot_kvm smoke/test_vm_snapshot_kvm
smoke/test_vm_snapshots smoke/test_vm_snapshots
smoke/test_volumes smoke/test_volumes
smoke/test_vpc_conserve_mode
smoke/test_vpc_ipv6 smoke/test_vpc_ipv6
smoke/test_vpc_redundant smoke/test_vpc_redundant
smoke/test_vpc_router_nics smoke/test_vpc_router_nics
@ -164,7 +169,8 @@ jobs:
component/test_cpu_limits component/test_cpu_limits
component/test_cpu_max_limits component/test_cpu_max_limits
component/test_cpu_project_limits component/test_cpu_project_limits
component/test_deploy_vm_userdata_multi_nic", component/test_deploy_vm_userdata_multi_nic
component/test_deploy_vm_lease",
"component/test_egress_fw_rules "component/test_egress_fw_rules
component/test_invalid_gw_nm component/test_invalid_gw_nm
component/test_ip_reservation", component/test_ip_reservation",
@ -211,20 +217,19 @@ jobs:
smoke/test_list_volumes"] smoke/test_list_volumes"]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up JDK - name: Set up JDK 17
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
java-version: '11' distribution: 'temurin'
distribution: 'adopt' java-version: '17'
architecture: x64 cache: 'maven'
cache: maven
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v6
with: with:
python-version: '3.10' python-version: '3.10'
architecture: 'x64' architecture: 'x64'
@ -336,7 +341,7 @@ jobs:
echo -e "Simulator CI Test Results: (only failures listed)\n" echo -e "Simulator CI Test Results: (only failures listed)\n"
python3 ./tools/marvin/xunit-reader.py integration-test-results/ python3 ./tools/marvin/xunit-reader.py integration-test-results/
- uses: codecov/codecov-action@v4 - uses: codecov/codecov-action@v6
with: with:
files: jacoco-coverage.xml files: jacoco-coverage.xml
fail_ci_if_error: true fail_ci_if_error: true

View File

@ -32,12 +32,12 @@ jobs:
name: codecov name: codecov
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up JDK 17 - name: Set up JDK 17
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '17' java-version: '17'
@ -49,7 +49,7 @@ jobs:
cd nonoss && bash -x install-non-oss.sh && cd .. cd nonoss && bash -x install-non-oss.sh && cd ..
mvn -P quality -Dsimulator -Dnoredist clean install -T$(nproc) mvn -P quality -Dsimulator -Dnoredist clean install -T$(nproc)
- uses: codecov/codecov-action@v4 - uses: codecov/codecov-action@v6
with: with:
files: ./client/target/site/jacoco-aggregate/jacoco.xml files: ./client/target/site/jacoco-aggregate/jacoco.xml
fail_ci_if_error: true fail_ci_if_error: true

48
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,48 @@
# 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.
name: CodeQL Analysis
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
actions: read
contents: read
security-events: write
jobs:
codeql:
name: CodeQL
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ["actions"]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "Security"

1022
.github/workflows/daily-repo-status.lock.yml generated vendored Normal file

File diff suppressed because it is too large Load Diff

54
.github/workflows/daily-repo-status.md vendored Normal file
View File

@ -0,0 +1,54 @@
---
description: |
This workflow creates daily repo status reports. It gathers recent repository
activity (issues, PRs, discussions, releases, code changes) and generates
engaging GitHub issues with productivity insights, community highlights,
and project recommendations.
on:
schedule: daily
workflow_dispatch:
permissions:
contents: read
issues: read
pull-requests: read
network: defaults
tools:
github:
# If in a public repo, setting `lockdown: false` allows
# reading issues, pull requests and comments from 3rd-parties
# If in a private repo this has no particular effect.
lockdown: false
safe-outputs:
create-issue:
title-prefix: "[repo-status] "
labels: [report, daily-status]
source: githubnext/agentics/workflows/daily-repo-status.md@d19056381ba48cb1f7c78510c23069701fa7ae87
---
# Daily Repo Status
Create an upbeat daily status report for the repo as a GitHub issue.
## What to include
- Recent repository activity (issues, PRs, discussions, releases, code changes)
- Progress tracking, goal reminders and highlights
- Project status and recommendations
- Actionable next steps for maintainers
## Style
- Be positive, encouraging, and helpful 🌟
- Use emojis moderately for engagement
- Keep it concise - adjust length based on actual activity
## Process
1. Gather recent activity from the repository
2. Study the repository, its issues and its pull requests
3. Create a new GitHub issue with your findings and insights

View File

@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Login to Docker Registry - name: Login to Docker Registry
uses: docker/login-action@v2 uses: docker/login-action@v4
with: with:
registry: ${{ secrets.DOCKER_REGISTRY }} registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKERHUB_USER }} username: ${{ secrets.DOCKERHUB_USER }}
@ -47,7 +47,7 @@ jobs:
- name: Set Docker repository name - name: Set Docker repository name
run: echo "DOCKER_REPOSITORY=apache" >> $GITHUB_ENV run: echo "DOCKER_REPOSITORY=apache" >> $GITHUB_ENV
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Set ACS version - name: Set ACS version
run: echo "ACS_VERSION=$(grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2 |cut -d'<' -f1)" >> $GITHUB_ENV run: echo "ACS_VERSION=$(grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2 |cut -d'<' -f1)" >> $GITHUB_ENV

1016
.github/workflows/issue-triage-agent.lock.yml generated vendored Normal file

File diff suppressed because it is too large Load Diff

78
.github/workflows/issue-triage-agent.md vendored Normal file
View File

@ -0,0 +1,78 @@
---
on:
schedule: 0 14 * * 1-5
workflow_dispatch: null
permissions:
issues: read
imports:
- github/gh-aw/.github/workflows/shared/reporting.md@94662b1dee8ce96c876ba9f33b3ab8be32de82a4
safe-outputs:
add-comment: {}
add-labels:
allowed:
- bug
- feature
- enhancement
- documentation
- question
- help-wanted
- good-first-issue
source: github/gh-aw/.github/workflows/issue-triage-agent.md@94662b1dee8ce96c876ba9f33b3ab8be32de82a4
strict: true
timeout-minutes: 5
tools:
github:
toolsets:
- issues
- labels
---
# Issue Triage Agent
List open issues in ${{ github.repository }} that have no labels. For each unlabeled issue, analyze the title and body, then add one of the allowed labels: `bug`, `feature`, `enhancement`, `documentation`, `question`, `help-wanted`, or `good-first-issue`.
Skip issues that:
- Already have any of these labels
- Have been assigned to any user (especially non-bot users)
After adding the label to an issue, mention the issue author in a comment using this format (follow shared/reporting.md guidelines):
**Comment Template**:
```markdown
### 🏷️ Issue Triaged
Hi @{author}! I've categorized this issue as **{label_name}** based on the following analysis:
**Reasoning**: {brief_explanation_of_why_this_label}
<details>
<summary><b>View Triage Details</b></summary>
#### Analysis
- **Keywords detected**: {list_of_keywords_that_matched}
- **Issue type indicators**: {what_made_this_fit_the_category}
- **Confidence**: {High/Medium/Low}
#### Recommended Next Steps
- {context_specific_suggestion_1}
- {context_specific_suggestion_2}
</details>
**References**: [Triage run §{run_id}](https://github.com/github/gh-aw/actions/runs/{run_id})
```
**Key formatting requirements**:
- Use h3 (###) for the main heading
- Keep reasoning visible for quick understanding
- Wrap detailed analysis in `<details>` tags
- Include workflow run reference
- Keep total comment concise (collapsed details prevent noise)
## Batch Comment Optimization
For efficiency, if multiple issues are triaged in a single run:
1. Add individual labels to each issue
2. Add a brief comment to each issue (using the template above)
3. Optionally: Create a discussion summarizing all triage actions for that run
This provides both per-issue context and batch visibility.

View File

@ -0,0 +1,16 @@
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.

View File

@ -32,26 +32,26 @@ jobs:
name: Main Sonar JaCoCo Build name: Main Sonar JaCoCo Build
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up JDK17 - name: Set up JDK17
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '17' java-version: '17'
cache: 'maven' cache: 'maven'
- name: Cache SonarCloud packages - name: Cache SonarCloud packages
uses: actions/cache@v4 uses: actions/cache@v5
with: with:
path: ~/.sonar/cache path: ~/.sonar/cache
key: ${{ runner.os }}-sonar key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar
- name: Cache local Maven repository - name: Cache local Maven repository
uses: actions/cache@v4 uses: actions/cache@v5
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }} key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }}

View File

@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Conflict Check - name: Conflict Check
uses: eps1lon/actions-label-merge-conflict@v2.0.0 uses: eps1lon/actions-label-merge-conflict@v3.0.3
with: with:
repoToken: "${{ secrets.GITHUB_TOKEN }}" repoToken: "${{ secrets.GITHUB_TOKEN }}"
dirtyLabel: "status:has-conflicts" dirtyLabel: "status:has-conflicts"

View File

@ -15,7 +15,7 @@
# specific language governing permissions and limitations # specific language governing permissions and limitations
# under the License. # under the License.
name: Lint name: pre-commit
on: [pull_request] on: [pull_request]
@ -32,16 +32,18 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Check Out - name: Check Out
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Install - name: Install
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install pre-commit pip install pre-commit
- name: Set PY - name: Set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: ~/.cache/pre-commit path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit - name: Run pre-commit
run: pre-commit run --all-files run: pre-commit run --color=always --all-files
- name: Run manual pre-commit hooks
run: pre-commit run --color=always --all-files --hook-stage manual

View File

@ -30,9 +30,9 @@ jobs:
build: build:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Set up JDK 17 - name: Set up JDK 17
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
java-version: '17' java-version: '17'
distribution: 'adopt' distribution: 'adopt'

View File

@ -33,27 +33,27 @@ jobs:
name: Sonar JaCoCo Coverage name: Sonar JaCoCo Coverage
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
ref: "refs/pull/${{ github.event.number }}/merge" ref: "refs/pull/${{ github.event.number }}/merge"
fetch-depth: 0 fetch-depth: 0
- name: Set up JDK17 - name: Set up JDK17
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '17' java-version: '17'
cache: 'maven' cache: 'maven'
- name: Cache SonarCloud packages - name: Cache SonarCloud packages
uses: actions/cache@v4 uses: actions/cache@v5
with: with:
path: ~/.sonar/cache path: ~/.sonar/cache
key: ${{ runner.os }}-sonar key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar
- name: Cache local Maven repository - name: Cache local Maven repository
uses: actions/cache@v4 uses: actions/cache@v5
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }} key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }}

49
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,49 @@
# 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.
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
actions: write
issues: write
pull-requests: write
steps:
- uses: actions/stale@v10
with:
stale-issue-message: 'This issue is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.'
stale-pr-message: 'This PR is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.'
close-issue-message: 'This issue was closed because it has been stale for 120 days with no activity.'
close-pr-message: 'This PR was closed because it has been stale for 240 days with no activity.'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
days-before-stale: 120
days-before-close: -1
days-before-pr-close: 240
exempt-issue-labels: 'gsoc,good-first-issue,long-term-plan'
exempt-pr-labels: 'status:ready-for-merge,status:needs-testing,status:on-hold'
- uses: actions/stale@v10
with:
stale-issue-label: 'archive'
days-before-stale: 240
exempt-issue-labels: 'gsoc,good-first-issue,long-term-plan'
days-before-close: -1

View File

@ -31,10 +31,10 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Set up Node - name: Set up Node
uses: actions/setup-node@v3 uses: actions/setup-node@v6
with: with:
node-version: 16 node-version: 16
@ -55,7 +55,7 @@ jobs:
npm run lint npm run lint
npm run test:unit npm run test:unit
- uses: codecov/codecov-action@v4 - uses: codecov/codecov-action@v6
if: github.repository == 'apache/cloudstack' if: github.repository == 'apache/cloudstack'
with: with:
working-directory: ui working-directory: ui

4
.gitignore vendored
View File

@ -5,9 +5,9 @@
# to you under the Apache License, Version 2.0 (the # to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance # "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at # with the License. You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, # Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an # software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

1
.markdownlintignore Normal file
View File

@ -0,0 +1 @@
CHANGES.md

View File

@ -15,23 +15,122 @@
# specific language governing permissions and limitations # specific language governing permissions and limitations
# under the License. # under the License.
--- ---
default_stages: [commit, push] default_stages: [pre-commit, pre-push]
default_language_version: default_language_version:
# force all unspecified Python hooks to run python3 # force all unspecified Python hooks to run python3
python: python3 python: python3
minimum_pre_commit_version: "2.17.0" minimum_pre_commit_version: "3.2.0"
repos: repos:
- repo: meta - repo: meta
hooks: hooks:
- id: identity - id: identity
- id: check-hooks-apply - id: check-hooks-apply
- repo: https://github.com/thlorenz/doctoc.git
rev: v2.2.0
hooks:
- id: doctoc
name: Add TOC for Markdown files
files: ^CONTRIBUTING\.md$|^INSTALL\.md$|^README\.md$
- repo: https://github.com/oxipng/oxipng
rev: v9.1.5
hooks:
- id: oxipng
name: run oxipng
description: optimize PNG images with lossless compression
args: ['-o', '4', '--strip', 'safe', '--alpha']
- repo: https://github.com/gitleaks/gitleaks
rev: v8.27.2
hooks:
- id: gitleaks
name: run gitleaks
description: detect hardcoded secrets
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: chmod
name: set file permissions
args: ['644']
files: \.md$
stages: [manual]
- id: insert-license
name: add license for all cfg files
description: automatically adds a licence header to all cfg files that don't have a license header
files: \.cfg$
args:
- --comment-style
- '|#|'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: add license for all Markdown files
files: \.md$
args:
- --comment-style
- '<!--|| -->'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
exclude: ^(CHANGES|ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE)\.md$|^ui/docs/(full|smoke)-test-plan\.template\.md$|^\.github/workflows/.*\.md$|^\.github/aw/.*\.md$
- id: insert-license
name: add license for all properties files
description: automatically adds a licence header to all properties files that don't have a license header
files: \.properties$
args:
- --comment-style
- '|#|'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: add license for all Shell files
description: automatically adds a licence header to all Shell files that don't have a license header
files: \.sh$
args:
- --comment-style
- '|#|'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: add license for all SQL files
files: \.sql$
args:
- --comment-style
- '|--|'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: add license for all Vue files
files: \.vue$
args:
- --comment-style
- '|//|'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: add license for all YAML files
description: automatically adds a licence header to all YAML files that don't have a license header
files: \.ya?ml$
args:
- --comment-style
- '|#|'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
exclude: ^\.github/workflows/.*\.lock\.yml$
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 rev: v6.0.0
hooks: hooks:
#- id: check-added-large-files #- id: check-added-large-files
- id: check-case-conflict - id: check-case-conflict
#- id: check-executables-have-shebangs #- id: check-executables-have-shebangs
- id: check-illegal-windows-names
- id: check-merge-conflict - id: check-merge-conflict
- id: check-shebang-scripts-are-executable
files: \.sh$
- id: check-symlinks - id: check-symlinks
- id: check-vcs-permalinks - id: check-vcs-permalinks
#- id: check-yaml #- id: check-yaml
@ -42,6 +141,7 @@ repos:
exclude: > exclude: >
(?x) (?x)
^scripts/vm/systemvm/id_rsa\.cloud$| ^scripts/vm/systemvm/id_rsa\.cloud$|
^server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest\.java$|
^server/src/test/java/com/cloud/keystore/KeystoreTest\.java$| ^server/src/test/java/com/cloud/keystore/KeystoreTest\.java$|
^server/src/test/resources/certs/dsa_self_signed\.key$| ^server/src/test/resources/certs/dsa_self_signed\.key$|
^server/src/test/resources/certs/non_root\.key$| ^server/src/test/resources/certs/non_root\.key$|
@ -51,47 +151,47 @@ repos:
^server/src/test/resources/certs/rsa_self_signed\.key$| ^server/src/test/resources/certs/rsa_self_signed\.key$|
^services/console-proxy/rdpconsole/src/test/doc/rdp-key\.pem$| ^services/console-proxy/rdpconsole/src/test/doc/rdp-key\.pem$|
^systemvm/agent/certs/localhost\.key$| ^systemvm/agent/certs/localhost\.key$|
^systemvm/agent/certs/realhostip\.key$ ^systemvm/agent/certs/realhostip\.key$|
^test/integration/smoke/test_ssl_offloading\.py$
- id: end-of-file-fixer - id: end-of-file-fixer
exclude: \.vhd$ exclude: \.vhd$|\.svg$
#- id: fix-byte-order-marker - id: file-contents-sorter
args: [--unique]
files: ^\.github/linters/codespell\.txt$
- id: fix-byte-order-marker
- id: forbid-submodules - id: forbid-submodules
- id: mixed-line-ending - id: mixed-line-ending
exclude: \.(cs|xml)$
- id: trailing-whitespace - id: trailing-whitespace
files: \.(header|in|java|md|properties|py|rb|sh|sql|txt|vue|xml|yaml|yml)$ files: ^(LICENSE|NOTICE)$|README$|\.(bat|cfg|config|cs|css|erb|gitignore|header|in|install|java|md|properties|py|rb|rc|sh|sql|svg|te|template|txt|ucls|vue|xml|xsl|yaml|yml)$|^cloud-cli/bindir/cloud-tool$|^debian/changelog$
args: [--markdown-linebreak-ext=md] args: [--markdown-linebreak-ext=md]
exclude: ^services/console-proxy/rdpconsole/src/test/doc/freerdp-debug-log\.txt$ exclude: ^services/console-proxy/rdpconsole/src/test/doc/freerdp-debug-log\.txt$
- repo: https://github.com/codespell-project/codespell - repo: https://github.com/codespell-project/codespell
rev: v2.2.6 rev: v2.4.2
hooks: hooks:
- id: codespell - id: codespell
name: run codespell name: run codespell
description: Check spelling with codespell description: Check spelling with codespell
args: [--ignore-words=.github/linters/codespell.txt]
exclude: ^ui/package\.json$|^ui/package-lock\.json$|^ui/public/js/less\.min\.js$|^ui/public/locales/.*[^n].*\.json$
- repo: https://github.com/pycqa/flake8 - repo: https://github.com/pycqa/flake8
rev: 7.0.0 rev: 7.0.0
hooks: hooks:
- id: flake8 - id: flake8
args: [--config, .github/linters/.flake8] args: [--config, .github/linters/.flake8]
exclude: >
(?x)
^agent/bindir/cloud-setup-agent\.in$|
^client/bindir/cloud-update-xenserver-licenses\.in$|
^cloud-cli/bindir/cloud-tool$|
^python/bindir/cloud-grab-dependent-library-versions$|
^python/bindir/cloud-setup-baremetal$|
^scripts/vm/hypervisor/xenserver/storagePlugin$|
^scripts/vm/hypervisor/xenserver/vmopspremium$|
^setup/bindir/cloud-setup-encryption\.in$|
^venv/.*$
- repo: https://github.com/igorshubovych/markdownlint-cli - repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.40.0 rev: v0.45.0
hooks: hooks:
- id: markdownlint - id: markdownlint
name: run markdownlint name: run markdownlint
description: check Markdown files with markdownlint description: check Markdown files with markdownlint
args: [--config=.github/linters/.markdown-lint.yml] args: [--config=.github/linters/.markdown-lint.yml]
types: [markdown] types: [markdown]
files: \.(md|mdown|markdown)$ files: \.md$
- repo: https://github.com/adrienverge/yamllint
rev: v1.37.1
hooks:
- id: yamllint
name: run yamllint
description: check YAML files with yamllint
args: [--config-file=.github/linters/.yamllint.yml]
types: [yaml]
files: \.ya?ml$
exclude: ^.*k8s-.*\.ya?ml$|^.github/workflows/.*\.lock\.ya?ml$

View File

@ -242,7 +242,6 @@ Bug ID | Description
[CLOUDSTACK-7722](https://issues.apache.org/jira/browse/CLOUDSTACK-7722) | add.label: Add button for tags show the label not "Add" text... [CLOUDSTACK-7722](https://issues.apache.org/jira/browse/CLOUDSTACK-7722) | add.label: Add button for tags show the label not "Add" text...
[CLOUDSTACK-7246](https://issues.apache.org/jira/browse/CLOUDSTACK-7246) | VM deployment failed due to wrong in script name createipalias.sh... [CLOUDSTACK-7246](https://issues.apache.org/jira/browse/CLOUDSTACK-7246) | VM deployment failed due to wrong in script name createipalias.sh...
Version 4.4.1 Version 4.4.1
------------- -------------
@ -276,7 +275,6 @@ Bug ID | Description
[CLOUDSTACK-1632](https://issues.apache.org/jira/browse/CLOUDSTACK-1632) | Mistakes in authorizeSecurityGroup* API docs... [CLOUDSTACK-1632](https://issues.apache.org/jira/browse/CLOUDSTACK-1632) | Mistakes in authorizeSecurityGroup* API docs...
[CLOUDSTACK-401](https://issues.apache.org/jira/browse/CLOUDSTACK-401) | Storage options missing from table... [CLOUDSTACK-401](https://issues.apache.org/jira/browse/CLOUDSTACK-401) | Storage options missing from table...
Version 4.4.0 Version 4.4.0
------------- -------------
@ -646,12 +644,12 @@ Bug ID | Description
Version 4.2.1 Version 4.2.1
------------- -------------
Release notes contain the list of [bug fixes](http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.1/html/Release_Notes/version-4.2.html#issues-fixed-4.2.1) Release notes contain the list of [bug fixes](https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.1/html/Release_Notes/version-4.2.html#issues-fixed-4.2.1)
Version 4.2.0 Version 4.2.0
------------- -------------
Released on October 1 2013. Released on October 1 2013.
Release notes contain the list of [bug fixes](http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Release_Notes/index.html) Release notes contain the list of [bug fixes](https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Release_Notes/index.html)
Version 4.1.0 Version 4.1.0
------------- -------------
@ -930,7 +928,6 @@ Security Fixes:
* CVE-2012-4501: Apache CloudStack configuration vulnerability * CVE-2012-4501: Apache CloudStack configuration vulnerability
Version 4.0.2 Version 4.0.2
------------------------ ------------------------
@ -979,7 +976,6 @@ Issues fixed in this release:
* CLOUDSTACK-2090: Upgrade from version 4.0.1 to version 4.0.2 triggers the 4.0.0 to 4.0.1. * CLOUDSTACK-2090: Upgrade from version 4.0.1 to version 4.0.2 triggers the 4.0.0 to 4.0.1.
* CLOUDSTACK-2091: Error in API documentation for 4.0.x. * CLOUDSTACK-2091: Error in API documentation for 4.0.x.
Version 4.0.1-incubating Version 4.0.1-incubating
------------------------ ------------------------
@ -1023,7 +1019,6 @@ Bugs fixed in this release:
* CLOUDSTACK-961: Installation docs don't detail dependencies for building RPMs * CLOUDSTACK-961: Installation docs don't detail dependencies for building RPMs
* CLOUDSTACK-995: Not able to add the KVM host * CLOUDSTACK-995: Not able to add the KVM host
Version 4.0.0-incubating Version 4.0.0-incubating
------------------------ ------------------------
@ -1056,7 +1051,6 @@ Security Fixes:
* CVE-2012-4501: Apache CloudStack configuration vulnerability * CVE-2012-4501: Apache CloudStack configuration vulnerability
Updating this file Updating this file
------------------ ------------------

View File

@ -1,46 +1,79 @@
Contributing to Apache CloudStack (ACS) <!--
======================================= 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.
-->
# Contributing to Apache CloudStack (ACS)
## Summary
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
- [Summary](#summary)
- [Bug fixes](#bug-fixes)
- [Developing new features](#developing-new-features)
- [PendingReleaseNotes file](#pendingreleasenotes-file)
- [Fork the code](#fork-the-code)
- [Making changes](#making-changes)
- [Rebase `feature_x` to include updates from `upstream/main`](#rebase-feature_x-to-include-updates-from-upstreammain)
- [Make a GitHub Pull Request to contribute your changes](#make-a-github-pull-request-to-contribute-your-changes)
- [Cleaning up after a successful pull request](#cleaning-up-after-a-successful-pull-request)
- [Release Principles](#release-principles)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Summary
Summary
-------
This document covers how to contribute to the ACS project. ACS uses GitHub PRs to manage code contributions. This document covers how to contribute to the ACS project. ACS uses GitHub PRs to manage code contributions.
These instructions assume you have a GitHub.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to your own fork of the ACS project and you will submit a Pull Request for your changes to be added. These instructions assume you have a GitHub.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to your own fork of the ACS project, and you will submit a Pull Request for your changes to be added.
_Lets get started!!!_ _Let's get started!!!_
Bug fixes ## Bug fixes
---------
It's very important that we can easily track bug fix commits, so their hashes should remain the same in all branches. It's very important that we can easily track bug fix commits, so their hashes should remain the same in all branches.
Therefore, a pull request (PR) that fixes a bug, should be sent against a release branch. Therefore, a pull request (PR) that fixes a bug, should be sent against a release branch.
This can be either the "current release" or the "previous release", depending on which ones are maintained. This can be either the "current release" or the "previous release", depending on which ones are maintained.
Since the goal is a stable main, bug fixes should be "merged forward" to the next branch in order: "previous release" -> "current release" -> main (in other words: old to new) Since the goal is a stable main, bug fixes should be "merged forward" to the next branch in order: "previous release" -> "current release" -> main (in other words: old to new)
Developing new features ## Developing new features
-----------------------
Development should be done in a feature branch, branched off of main. Development should be done in a feature branch, branched off of main.
Send a PR(steps below) to get it into main (2x LGTM applies). Send a PR(steps below) to get it into main (2x LGTM applies).
PR will only be merged when main is open, will be held otherwise until main is open again. PR will only be merged when main is open, will be held otherwise until main is open again.
No back porting / cherry-picking features to existing branches! No back porting / cherry-picking features to existing branches!
PendingReleaseNotes file ## PendingReleaseNotes file
------------------------
When developing a new feature or making a (major) change to a existing feature you are encouraged to append this to the PendingReleaseNotes file so that the Release Manager can When developing a new feature or making a (major) change to an existing feature you are encouraged to append this to the PendingReleaseNotes file so that the Release Manager can
use this file as a source of information when compiling the Release Notes for a new release. use this file as a source of information when compiling the Release Notes for a new release.
When adding information to the PendingReleaseNotes file make sure that you write a good and understandable description of the new feature or change which you have developed. When adding information to the PendingReleaseNotes file make sure that you write a good and understandable description of the new feature or change which you have developed.
Updating the PendingReleaseNotes file is preferably a part of the original Pull Request, but that is up to the developers' discretion. Updating the PendingReleaseNotes file is preferably a part of the original Pull Request, but that is up to the developers' discretion.
Fork the code ## Fork the code
-------------
In your browser, navigate to: [https://github.com/apache/cloudstack](https://github.com/apache/cloudstack) In your browser, navigate to: [https://github.com/apache/cloudstack](https://github.com/apache/cloudstack)
Fork the repository by clicking on the 'Fork' button on the top right hand side. The fork will happen and you will be taken to your own fork of the repository. Copy the Git repository URL by clicking on the clipboard next to the URL on the right hand side of the page under '**HTTPS** clone URL'. You will paste this URL when doing the following `git clone` command. Fork the repository by clicking on the 'Fork' button on the top right hand side. The fork will happen, and you will be taken to your own fork of the repository. Copy the Git repository URL by clicking on the clipboard next to the URL on the right hand side of the page under '**HTTPS** clone URL'. You will paste this URL when doing the following `git clone` command.
On your computer, follow these steps to setup a local repository for working on ACS: On your computer, follow these steps to set up a local repository for working on ACS:
```bash ```bash
$ git clone https://github.com/YOUR_ACCOUNT/cloudstack.git $ git clone https://github.com/YOUR_ACCOUNT/cloudstack.git
@ -51,10 +84,7 @@ $ git fetch upstream
$ git rebase upstream/main $ git rebase upstream/main
``` ```
## Making changes
Making changes
--------------
It is important that you create a new branch to make changes on and that you do not change the `main` branch (other than to rebase in changes from `upstream/main`). In this example I will assume you will be making your changes to a branch called `feature_x`. This `feature_x` branch will be created on your local repository and will be pushed to your forked repository on GitHub. Once this branch is on your fork you will create a Pull Request for the changes to be added to the ACS project. It is important that you create a new branch to make changes on and that you do not change the `main` branch (other than to rebase in changes from `upstream/main`). In this example I will assume you will be making your changes to a branch called `feature_x`. This `feature_x` branch will be created on your local repository and will be pushed to your forked repository on GitHub. Once this branch is on your fork you will create a Pull Request for the changes to be added to the ACS project.
@ -70,9 +100,7 @@ $ git commit -a -m "descriptive commit message for your changes"
> The `-b` specifies that you want to create a new branch called `feature_x`. You only specify `-b` the first time you checkout because you are creating a new branch. Once the `feature_x` branch exists, you can later switch to it with only `git checkout feature_x`. > The `-b` specifies that you want to create a new branch called `feature_x`. You only specify `-b` the first time you checkout because you are creating a new branch. Once the `feature_x` branch exists, you can later switch to it with only `git checkout feature_x`.
## Rebase `feature_x` to include updates from `upstream/main`
Rebase `feature_x` to include updates from `upstream/main`
------------------------------------------------------------
It is important that you maintain an up-to-date `main` branch in your local repository. This is done by rebasing in the code changes from `upstream/main` (the official ACS project repository) into your local repository. You will want to do this before you start working on a feature as well as right before you submit your changes as a pull request. I recommend you do this process periodically while you work to make sure you are working off the most recent project code. It is important that you maintain an up-to-date `main` branch in your local repository. This is done by rebasing in the code changes from `upstream/main` (the official ACS project repository) into your local repository. You will want to do this before you start working on a feature as well as right before you submit your changes as a pull request. I recommend you do this process periodically while you work to make sure you are working off the most recent project code.
@ -92,13 +120,11 @@ $ git rebase main
> Now your `feature_x` branch is up-to-date with all the code in `upstream/main`. > Now your `feature_x` branch is up-to-date with all the code in `upstream/main`.
## Make a GitHub Pull Request to contribute your changes
Make a GitHub Pull Request to contribute your changes When you are happy with your changes, and you are ready to contribute them, you will create a Pull Request on GitHub to do so. This is done by pushing your local changes to your forked repository (default remote name is `origin`) and then initiating a pull request on GitHub.
-----------------------------------------------------
When you are happy with your changes and you are ready to contribute them, you will create a Pull Request on GitHub to do so. This is done by pushing your local changes to your forked repository (default remote name is `origin`) and then initiating a pull request on GitHub. Please include JIRA id, detailed information about the bug/feature, what all tests are executed, how the reviewer can test this feature etc. In case of UI PRs, a screenshot is preferred.
Please include JIRA id, detailed information about the bug/feature, what all tests are executed, how the reviewer can test this feature etc. Incase of UI PRs, a screenshot is preferred.
> **IMPORTANT:** Make sure you have rebased your `feature_x` branch to include the latest code from `upstream/main` _before_ you do this. > **IMPORTANT:** Make sure you have rebased your `feature_x` branch to include the latest code from `upstream/main` _before_ you do this.
@ -107,7 +133,7 @@ $ git push origin main
$ git push origin feature_x $ git push origin feature_x
``` ```
Now that the `feature_x` branch has been pushed to your GitHub repository, you can initiate the pull request. Now that the `feature_x` branch has been pushed to your GitHub repository, you can initiate the pull request.
To initiate the pull request, do the following: To initiate the pull request, do the following:
@ -118,9 +144,7 @@ To initiate the pull request, do the following:
If you are requested to make modifications to your proposed changes, make the changes locally on your `feature_x` branch, re-push the `feature_x` branch to your fork. The existing pull request should automatically pick up the change and update accordingly. If you are requested to make modifications to your proposed changes, make the changes locally on your `feature_x` branch, re-push the `feature_x` branch to your fork. The existing pull request should automatically pick up the change and update accordingly.
## Cleaning up after a successful pull request
Cleaning up after a successful pull request
-------------------------------------------
Once the `feature_x` branch has been committed into the `upstream/main` branch, your local `feature_x` branch and the `origin/feature_x` branch are no longer needed. If you want to make additional changes, restart the process with a new branch. Once the `feature_x` branch has been committed into the `upstream/main` branch, your local `feature_x` branch and the `origin/feature_x` branch are no longer needed. If you want to make additional changes, restart the process with a new branch.
@ -134,6 +158,6 @@ $ git branch -D feature_x
$ git push origin :feature_x $ git push origin :feature_x
``` ```
Release Principles ## Release Principles
------------------
Detailed information about ACS release principles is available at https://cwiki.apache.org/confluence/display/CLOUDSTACK/Release+principles+for+Apache+CloudStack+4.6+and+up Detailed information about ACS release principles is available at https://cwiki.apache.org/confluence/display/CLOUDSTACK/Release+principles+for+Apache+CloudStack+4.6+and+up

View File

@ -1,15 +1,46 @@
<!--
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.
-->
# Apache CloudStack Installation basics # Apache CloudStack Installation basics
This document describes how to develop, build, package and install Apache This document describes how to develop, build, package and install Apache
CloudStack. For more information please refer to the official [documentation](http://docs.cloudstack.apache.org) CloudStack. For more information please refer to the official [documentation](https://docs.cloudstack.apache.org)
or the developer [wiki](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Home). or the developer [wiki](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Home).
Apache CloudStack developers use various platforms for development, this guide Apache CloudStack developers use various platforms for development, this guide
was tested against a CentOS 7 x86_64 setup. was tested against a CentOS 7 x86_64 setup.
* [Setting up development environment](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment) for Apache CloudStack. <!-- START doctoc generated TOC please keep comment here to allow auto update -->
* [Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack) Apache CloudStack. <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
* [Appliance based development](https://github.com/rhtyd/monkeybox)
- [Setting up Development Environment](#setting-up-development-environment)
- [Using jenv and/or pyenv for Version Management](#using-jenv-andor-pyenv-for-version-management)
- [Getting the Source Code](#getting-the-source-code)
- [Building](#building)
- [To bring up CloudStack UI](#to-bring-up-cloudstack-ui)
- [Building with non-redistributable plugins](#building-with-non-redistributable-plugins)
- [Packaging and Installation](#packaging-and-installation)
- [Debian/Ubuntu](#debianubuntu)
- [RHEL/CentOS](#rhelcentos)
- [Notes](#notes)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Setting up Development Environment ## Setting up Development Environment
@ -18,29 +49,30 @@ Install tools and dependencies used for development:
# yum -y install git java-17-openjdk java-17-openjdk-devel \ # yum -y install git java-17-openjdk java-17-openjdk-devel \
mysql mysql-server mkisofs git gcc python MySQL-python openssh-clients wget mysql mysql-server mkisofs git gcc python MySQL-python openssh-clients wget
Set up Maven (3.6.0): Set up Maven (3.9.10):
# wget http://www.us.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz # wget https://dlcdn.apache.org/maven/maven-3/3.9.10/binaries/apache-maven-3.9.10-bin.tar.gz
# tar -zxvf apache-maven-3.6.3-bin.tar.gz -C /usr/local # sudo tar -zxvf apache-maven-3.9.10-bin.tar.gz -C /usr/local
# cd /usr/local # cd /usr/local
# ln -s apache-maven-3.6.3 maven # sudo ln -s apache-maven-3.9.10 maven
# echo export M2_HOME=/usr/local/maven >> ~/.bashrc # or .zshrc or .profile # echo export M2_HOME=/usr/local/maven >> ~/.bashrc # or .zshrc or .profile
# echo export PATH=/usr/local/maven/bin:${PATH} >> ~/.bashrc # or .zshrc or .profile # echo export PATH=/usr/local/maven/bin:${PATH} >> ~/.bashrc # or .zshrc or .profile
# source ~/.bashrc # source ~/.bashrc
Setup up NodeJS (LTS): Setup up Node.js 16:
# curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash - # curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -
# sudo yum install nodejs # sudo yum install nodejs
# sudo npm install -g @vue/cli npm-check-updates # sudo npm install -g @vue/cli npm-check-updates
Start the MySQL service: Start the MySQL service:
$ service mysqld start $ service mysqld start
$ mysql_secure_installation
### Using jenv and/or pyenv for Version Management ### Using jenv and/or pyenv for Version Management
CloudStack is built using Java and Python. To make selection of these tools versions more consistent and ease installation for developers, optional support for [jenv](http://www.jenv.be/) and [pyenv](https://github.com/yyuu/pyenv) with [virtualenv]|(https://github.com/yyuu/pyenv-virtualenv) is provided. jenv installation instructions are available here and pyenv installation instructions are available here. For users of [oh-my-zsh](http://ohmyz.sh/) there is a pyenv plugin available to trigger configuration of pyenv in a shell session. CloudStack is built using Java and Python. To make selection of these tools versions more consistent and ease installation for developers, optional support for [jenv](http://www.jenv.be/) and [pyenv](https://github.com/yyuu/pyenv) with [virtualenv]|(https://github.com/yyuu/pyenv-virtualenv) is provided. jenv installation instructions are available here and pyenv installation instructions are available here. For users of [oh-my-zsh](https://ohmyz.sh/) there is a pyenv plugin available to trigger configuration of pyenv in a shell session.
Following installation, execute the following commands to configure jenv and pyenv for use with CloudStack development: Following installation, execute the following commands to configure jenv and pyenv for use with CloudStack development:
@ -86,13 +118,33 @@ Start the management server:
If this works, you've successfully setup a single server Apache CloudStack installation. If this works, you've successfully setup a single server Apache CloudStack installation.
Open the following URL on your browser to access the Management Server UI: To access the Management Server UI, follow the following procedure:
http://localhost:8080/client/
The default credentials are; user: admin, password: password and the domain The default credentials are; user: admin, password: password and the domain
field should be left blank which is defaulted to the ROOT domain. field should be left blank which is defaulted to the ROOT domain.
## To bring up CloudStack UI
Move to UI Directory
$ cd /path/to/cloudstack/ui
To install dependencies.
$ npm install
To build the project.
$ npm run build
For Development Mode.
$ npm start
Make sure to set `CS_URL=http://localhost:8080` on the `.env.local` file on UI.
You should be able to run the management server on http://localhost:5050
## Building with non-redistributable plugins ## Building with non-redistributable plugins
CloudStack supports several plugins that depend on libraries with distribution restrictions. CloudStack supports several plugins that depend on libraries with distribution restrictions.
@ -150,7 +202,7 @@ All the rpm packages will be created in `dist/rpmbuild/RPMS/x86_64` directory.
## Notes ## Notes
If you will be using Xen as your hypervisor, please download [vhd-util](http://download.cloudstack.org/tools/vhd-util) If you will be using Xen as your hypervisor, please download [vhd-util](https://download.cloudstack.org/tools/vhd-util)
If management server is installed on RHEL/CentOS, then copy vhd-util into: If management server is installed on RHEL/CentOS, then copy vhd-util into:

View File

@ -35,17 +35,14 @@ New line separated list of affected versions, commit ID for issues on main branc
Information about the configuration if relevant, e.g. basic network, advanced networking, etc. N/A otherwise Information about the configuration if relevant, e.g. basic network, advanced networking, etc. N/A otherwise
--> -->
##### OS / ENVIRONMENT ##### OS / ENVIRONMENT
<!-- <!--
Information about the environment if relevant, N/A otherwise Information about the environment if relevant, N/A otherwise
--> -->
##### SUMMARY ##### SUMMARY
<!-- Explain the problem/feature briefly --> <!-- Explain the problem/feature briefly -->
##### STEPS TO REPRODUCE ##### STEPS TO REPRODUCE
<!-- <!--
For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate. For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.

242
LICENSE
View File

@ -177,14 +177,14 @@ Copyright (c) 2014 The Apache Software Foundation
of your accepting any such warranty or additional liability. of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
This distribution contains third party resources. This distribution contains third party resources.
Within the console-proxy/js directory Within the console-proxy/js directory
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
Copyright (c) 2009, John Resig Copyright (c) 2009, John Resig
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
@ -192,10 +192,10 @@ Within the console-proxy/js directory
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -203,43 +203,43 @@ Within the console-proxy/js directory
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from John Resig from John Resig
jquery.js jquery.js
Within the systemvm/debian/etc directory Within the systemvm/debian/etc directory
placed in the public domain placed in the public domain
by Adiscon GmbH http://www.adiscon.com/ by Adiscon GmbH http://www.adiscon.com/
rsyslog.conf rsyslog.conf
by Simon Kelley by Simon Kelley
dnsmasq.conf dnsmasq.conf
vpcdnsmasq.conf vpcdnsmasq.conf
Within the systemvm/debian/etc/apache2 directory Within the systemvm/debian/etc/apache2 directory
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above) licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
Copyright (c) 2012 The Apache Software Foundation Copyright (c) 2012 The Apache Software Foundation
from The Apache Software Foundation http://www.apache.org/ from The Apache Software Foundation http://www.apache.org/
httpd.conf httpd.conf
vhost.template vhost.template
Within the systemvm/debian/etc/ssh/ directory Within the systemvm/debian/etc/ssh/ directory
licensed under the BSD (2-clause) http://www.opensource.org/licenses/BSD-2-Clause (as follows) licensed under the BSD (2-clause) http://www.opensource.org/licenses/BSD-2-Clause (as follows)
Redistribution and use in source and binary forms, with or without modification, Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer. Redistributions in binary form must of conditions and the following disclaimer. Redistributions in binary form must
reproduce the above copyright notice, this list of conditions and the following reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the disclaimer in the documentation and/or other materials provided with the
distribution. distribution.
Neither the name of the author nor the names of contributors may be used to Neither the name of the author nor the names of contributors may be used to
endorse or promote products derived from this software without specific prior endorse or promote products derived from this software without specific prior
written permission. written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -250,55 +250,55 @@ Within the systemvm/debian/etc/ssh/ directory
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from OpenSSH Project http://www.openssh.org/ from OpenSSH Project http://www.openssh.org/
sshd_config sshd_config
Within the systemvm/debian/root/redundant_router directory Within the systemvm/debian/root/redundant_router directory
placed in the public domain placed in the public domain
by The netfilter.org project http://www.netfilter.org/ by The netfilter.org project http://www.netfilter.org/
conntrackd.conf.templ conntrackd.conf.templ
Within the scripts/storage/secondary directory Within the scripts/storage/secondary directory
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above) licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
Copyright (c) 2010-2011 OpenStack, LLC. Copyright (c) 2010-2011 OpenStack, LLC.
from OpenStack, LLC http://www.openstack.org from OpenStack, LLC http://www.openstack.org
swift swift
Within the scripts/vm/hypervisor/xenserver directory Within the scripts/vm/hypervisor/xenserver directory
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above) licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
Copyright (c) 2010-2011 OpenStack, LLC. Copyright (c) 2010-2011 OpenStack, LLC.
from OpenStack, LLC http://www.openstack.org from OpenStack, LLC http://www.openstack.org
swift swift
Within the ui/lib directory Within the ui/lib directory
placed in the public domain placed in the public domain
by Eric Meyer http://meyerweb.com/eric/ by Eric Meyer http://meyerweb.com/eric/
reset.css from http://meyerweb.com/eric/tools/css/reset/ reset.css from http://meyerweb.com/eric/tools/css/reset/
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above) licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
Copyright (c) 2006 Google Inc. Copyright (c) 2006 Google Inc.
from Google Inc. http://google.com from Google Inc. http://google.com
excanvas.js from http://code.google.com/p/explorercanvas/ excanvas.js from http://code.google.com/p/explorercanvas/
licensed under the BSD (2-clause) http://www.opensource.org/licenses/BSD-2-Clause (as follows) licensed under the BSD (2-clause) http://www.opensource.org/licenses/BSD-2-Clause (as follows)
Copyright (c) 2008 George McGinley Smith Copyright (c) 2008 George McGinley Smith
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer. Redistributions in binary form must of conditions and the following disclaimer. Redistributions in binary form must
reproduce the above copyright notice, this list of conditions and the following reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the disclaimer in the documentation and/or other materials provided with the
distribution. distribution.
Neither the name of the author nor the names of contributors may be used to Neither the name of the author nor the names of contributors may be used to
endorse or promote products derived from this software without specific prior endorse or promote products derived from this software without specific prior
written permission. written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -309,13 +309,13 @@ Within the ui/lib directory
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from George McGinley Smith from George McGinley Smith
jquery.easing.js jquery.easing.js
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
@ -323,10 +323,10 @@ Within the ui/lib directory
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -334,14 +334,14 @@ Within the ui/lib directory
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from The Dojo Foundation http://dojofoundation.org/ from The Dojo Foundation http://dojofoundation.org/
require.js from http://github.com/jrburke/requirejs require.js from http://github.com/jrburke/requirejs
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
Copyright (c) 2011, John Resig Copyright (c) 2011, John Resig
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
@ -349,10 +349,10 @@ Within the ui/lib directory
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -360,14 +360,14 @@ Within the ui/lib directory
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from John Resig from John Resig
jquery.js jquery.js
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
Copyright (c) 2014 Jörn Zaefferer Copyright (c) 2014 Jörn Zaefferer
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
@ -375,10 +375,10 @@ Within the ui/lib directory
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -386,9 +386,9 @@ Within the ui/lib directory
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from Jorn Zaefferer from Jorn Zaefferer
jquery.validate.js jquery.validate.js
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
@ -418,8 +418,8 @@ Within the ui/lib directory
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
Copyright (c) 2010, Sebastian Tschan Copyright (c) 2010, Sebastian Tschan
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
@ -427,10 +427,10 @@ Within the ui/lib directory
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -438,14 +438,14 @@ Within the ui/lib directory
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from Sebastian Tschan https://blueimp.net from Sebastian Tschan https://blueimp.net
jquery.md5.js jquery.md5.js
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
Copyright (c) 2006 Klaus Hartl (stilbuero.de) Copyright (c) 2006 Klaus Hartl (stilbuero.de)
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
@ -453,10 +453,10 @@ Within the ui/lib directory
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -464,15 +464,15 @@ Within the ui/lib directory
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from Klaus Hartl http://stilbuero.de from Klaus Hartl http://stilbuero.de
jquery.cookies.js jquery.cookies.js
Within the ui/lib/flot directory Within the ui/lib/flot directory
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
Released under the MIT license by IOLA, December 2007. Released under the MIT license by IOLA, December 2007.
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
@ -480,10 +480,10 @@ Within the ui/lib/flot directory
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -491,24 +491,24 @@ Within the ui/lib/flot directory
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from IOLA http://www.iola.dk/ from IOLA http://www.iola.dk/
jquery.flot.crosshair.js jquery.flot.crosshair.js
jquery.flot.fillbetween.js jquery.flot.fillbetween.js
jquery.flot.image.js jquery.flot.image.js
jquery.flot.js jquery.flot.js
jquery.flot.navigate.js jquery.flot.navigate.js
jquery.flot.resize.js jquery.flot.resize.js
jquery.flot.selection.js jquery.flot.selection.js
jquery.flot.stack.js jquery.flot.stack.js
jquery.flot.symbol.js jquery.flot.symbol.js
jquery.flot.threshold.js jquery.flot.threshold.js
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
Created by Brian Medendorp, June 2009 Created by Brian Medendorp, June 2009
Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
@ -516,10 +516,10 @@ Within the ui/lib/flot directory
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -527,13 +527,13 @@ Within the ui/lib/flot directory
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from Brian Medendorp from Brian Medendorp
jquery.pie.js jquery.pie.js
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
@ -541,10 +541,10 @@ Within the ui/lib/flot directory
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -552,14 +552,14 @@ Within the ui/lib/flot directory
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from Ole Laursen from Ole Laursen
jquery.colorhelpers.js jquery.colorhelpers.js
Within the ui/lib/jquery-ui directory Within the ui/lib/jquery-ui directory
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
@ -567,10 +567,10 @@ Within the ui/lib/jquery-ui directory
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -578,17 +578,17 @@ Within the ui/lib/jquery-ui directory
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from jQuery UI Developers http://jqueryui.com/about from jQuery UI Developers http://jqueryui.com/about
css/jquery-ui.css css/jquery-ui.css
index.html index.html
js/jquery-ui.js js/jquery-ui.js
Within the ui/lib/qunit directory Within the ui/lib/qunit directory
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
Copyright (c) 2012 John Resig, Jörn Zaefferer Copyright (c) 2012 John Resig, Jörn Zaefferer
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
@ -596,10 +596,10 @@ Within the ui/lib/qunit directory
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -607,20 +607,20 @@ Within the ui/lib/qunit directory
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from Jorn Zaefferer from Jorn Zaefferer
qunit.css from http://docs.jquery.com/QUnit qunit.css from http://docs.jquery.com/QUnit
qunit.js from http://docs.jquery.com/QUnit qunit.js from http://docs.jquery.com/QUnit
Within the utils/src/main/java/com/cloud/utils/db directory Within the utils/src/main/java/com/cloud/utils/db directory
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above) licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
Copyright (c) 2004 Clinton Begin Copyright (c) 2004 Clinton Begin
from Clinton Begin http://code.google.com/p/mybatis/ from Clinton Begin http://code.google.com/p/mybatis/
ScriptRunner.java from http://code.google.com/p/mybatis/ ScriptRunner.java from http://code.google.com/p/mybatis/
Within the utils/src/main/java/org/apache/commons/httpclient/contrib/ssl directory Within the utils/src/main/java/org/apache/commons/httpclient/contrib/ssl directory
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above) licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
Copyright (c) 2007 The Apache Software Foundation Copyright (c) 2007 The Apache Software Foundation
from The Apache Software Foundation http://www.apache.org/ from The Apache Software Foundation http://www.apache.org/
EasySSLProtocolSocketFactory.java EasySSLProtocolSocketFactory.java
EasyX509TrustManager.java EasyX509TrustManager.java

52
NOTICE
View File

@ -1,62 +1,62 @@
Apache CloudStack Apache CloudStack
Copyright 2014 The Apache Software Foundation Copyright 2014 The Apache Software Foundation
This product includes software developed at This product includes software developed at
The Apache Software Foundation (http://www.apache.org/). The Apache Software Foundation (http://www.apache.org/).
This distribution contains third party resources requiring the following notices: This distribution contains third party resources requiring the following notices:
For For
jquery.js jquery.js
jQuery JavaScript Library v1.3.2 jQuery JavaScript Library v1.3.2
http://jquery.com/ http://jquery.com/
Copyright (c) 2009 John Resig Copyright (c) 2009 John Resig
Dual licensed under the MIT and GPL licenses. Dual licensed under the MIT and GPL licenses.
http://docs.jquery.com/License http://docs.jquery.com/License
Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
Revision: 6246 Revision: 6246
For For
jquery.js jquery.js
jQuery JavaScript Library v1.6.4 jQuery JavaScript Library v1.6.4
http://jquery.com/ http://jquery.com/
Copyright 2011, John Resig Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses. Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license http://jquery.org/license
Includes Sizzle.js Includes Sizzle.js
http://sizzlejs.com/ http://sizzlejs.com/
Copyright 2011, The Dojo Foundation Copyright 2011, The Dojo Foundation
Released under the MIT, BSD, and GPL Licenses. Released under the MIT, BSD, and GPL Licenses.
Date: Mon Sep 12 18:54:48 2011 -0400 Date: Mon Sep 12 18:54:48 2011 -0400
For For
jquery.md5.js jquery.md5.js
jQuery MD5 Plugin 1.2.1 jQuery MD5 Plugin 1.2.1
https://github.com/blueimp/jQuery-MD5 https://github.com/blueimp/jQuery-MD5
Copyright 2010, Sebastian Tschan Copyright 2010, Sebastian Tschan
https://blueimp.net https://blueimp.net
Licensed under the MIT license: Licensed under the MIT license:
http://creativecommons.org/licenses/MIT/ http://creativecommons.org/licenses/MIT/
Based on Based on
A JavaScript implementation of the RSA Data Security, Inc. MD5 Message A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
Digest Algorithm, as defined in RFC 1321. Digest Algorithm, as defined in RFC 1321.
@ -65,15 +65,15 @@ Copyright 2014 The Apache Software Foundation
Distributed under the BSD License Distributed under the BSD License
See http://pajhome.org.uk/crypt/md5 for more info. See http://pajhome.org.uk/crypt/md5 for more info.
For For
jquery.colorhelpers.js jquery.colorhelpers.js
Plugin for jQuery for working with colors. Plugin for jQuery for working with colors.
Version 1.1. Version 1.1.
Inspiration from jQuery color animation plugin by John Resig. Inspiration from jQuery color animation plugin by John Resig.
Released under the MIT license by Ole Laursen, October 2009. Released under the MIT license by Ole Laursen, October 2009.

62
PRE_COMMIT.md Normal file
View File

@ -0,0 +1,62 @@
<!--
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.
-->
# pre-commit
We run [pre-commit](https://pre-commit.com/) with
[GitHub Actions](https://github.com/apache/cloudstack/blob/main/.github/workflows/pre-commit.yml) so installation on your
local machine is currently optional.
The `pre-commit` [configuration file](https://github.com/apache/cloudstack/blob/main/.pre-commit-config.yaml)
is in the repository root. Before you can run the hooks, you need to have `pre-commit` installed. `pre-commit` is a
[Python package](https://pypi.org/project/pre-commit/).
From the repository root run: `pip install -r requirements-dev.txt` to install `pre-commit` and after you install
`pre-commit` you will then need to install the pre-commit hooks by running `pre-commit install`.
The hooks run when running `git commit` and also from the command line with `pre-commit`. Some of the hooks will auto
fix the code after the hooks fail whilst most will print error messages from the linters. If a hook fails the overall
commit will fail, and you will need to fix the issues or problems and `git add` and `git commit` again. On `git commit`
the hooks will run mostly only against modified files so if you want to test all hooks against all files and when you
are adding a new hook you should always run:
`pre-commit run --all-files`
Sometimes you might need to skip a hook to commit because the hook is stopping you from committing or your computer
might not have all the installation requirements for all the hooks. The `SKIP` variable is comma separated for two or
more hooks:
`SKIP=codespell git commit -m "foo"`
The same applies when running pre-commit:
`SKIP=codespell pre-commit run --all-files`
Occasionally you can have more serious problems when using `pre-commit` with `git commit`. You can use `--no-verify` to
commit and stop `pre-commit` from checking the hooks. For example:
`git commit --no-verify -m "foo"`
If you are having major problems using `pre-commit` you can always uninstall it.
To run a single hook use `pre-commit run --all-files <hook_id>`
For example just run the `codespell` hook:
`pre-commit run --all-files codespell`

View File

@ -22,8 +22,8 @@ This PR...
- [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality) - [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] build/CI - [ ] Build/CI
- [ ] test (unit or integration test code) - [ ] Test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity ### Feature/Enhancement Scale or Bug Severity
@ -40,10 +40,8 @@ This PR...
- [ ] Minor - [ ] Minor
- [ ] Trivial - [ ] Trivial
### Screenshots (if appropriate): ### Screenshots (if appropriate):
### How Has This Been Tested? ### How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. --> <!-- Please describe in detail how you tested your changes. -->
@ -53,5 +51,4 @@ This PR...
<!-- see how your change affects other areas of the code, etc. --> <!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document --> <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->

View File

@ -1,7 +1,54 @@
# Apache CloudStack [![Build Status](https://github.com/apache/cloudstack/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/apache/cloudstack/actions/workflows/build.yml) [![UI Build](https://github.com/apache/cloudstack/actions/workflows/ui.yml/badge.svg)](https://github.com/apache/cloudstack/actions/workflows/ui.yml) [![License Check](https://github.com/apache/cloudstack/actions/workflows/rat.yml/badge.svg?branch=main)](https://github.com/apache/cloudstack/actions/workflows/rat.yml) [![Simulator CI](https://github.com/apache/cloudstack/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/apache/cloudstack/actions/workflows/ci.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=apache_cloudstack&metric=alert_status)](https://sonarcloud.io/dashboard?id=apache_cloudstack) [![codecov](https://codecov.io/gh/apache/cloudstack/branch/main/graph/badge.svg)](https://codecov.io/gh/apache/cloudstack) <!--
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.
-->
# Apache CloudStack
[![Build Status](https://github.com/apache/cloudstack/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/apache/cloudstack/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/apache/cloudstack/branch/main/graph/badge.svg)](https://codecov.io/gh/apache/cloudstack)
[![Docker CloudStack Simulator Status](https://github.com/apache/cloudstack/actions/workflows/docker-cloudstack-simulator.yml/badge.svg?branch=main)](https://github.com/apache/cloudstack/actions/workflows/docker-cloudstack-simulator.yml)
[![License Check](https://github.com/apache/cloudstack/actions/workflows/rat.yml/badge.svg?branch=main)](https://github.com/apache/cloudstack/actions/workflows/rat.yml)
[![Linter Status](https://github.com/apache/cloudstack/actions/workflows/linter.yml/badge.svg)](https://github.com/apache/cloudstack/actions/workflows/linter.yml)
[![Merge Conflict Checker Status](https://github.com/apache/cloudstack/actions/workflows/merge-conflict-checker.yml/badge.svg?branch=main)](https://github.com/apache/cloudstack/actions/workflows/merge-conflict-checker.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=apache_cloudstack&metric=alert_status)](https://sonarcloud.io/dashboard?id=apache_cloudstack)
[![Simulator CI](https://github.com/apache/cloudstack/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/apache/cloudstack/actions/workflows/ci.yml)
[![UI Build](https://github.com/apache/cloudstack/actions/workflows/ui.yml/badge.svg?branch=main)](https://github.com/apache/cloudstack/actions/workflows/ui.yml)
[![Apache CloudStack](tools/logo/apache_cloudstack.png)](https://cloudstack.apache.org/) [![Apache CloudStack](tools/logo/apache_cloudstack.png)](https://cloudstack.apache.org/)
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
- [Who Uses CloudStack?](#who-uses-cloudstack)
- [Demo](#demo)
- [Getting Started](#getting-started)
- [Getting Source Repository](#getting-source-repository)
- [Documentation](#documentation)
- [News and Events](#news-and-events)
- [Getting Involved and Contributing](#getting-involved-and-contributing)
- [Reporting Security Vulnerabilities](#reporting-security-vulnerabilities)
- [License](#license)
- [Notice of Cryptographic Software](#notice-of-cryptographic-software)
- [Star History](#star-history)
- [Contributors](#contributors)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
Apache CloudStack is open source software designed to deploy and manage large Apache CloudStack is open source software designed to deploy and manage large
networks of virtual machines, as a highly available, highly scalable networks of virtual machines, as a highly available, highly scalable
Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used
@ -21,7 +68,7 @@ OVM and LXC containers.
Users can manage their cloud with an easy to use Web interface, command line Users can manage their cloud with an easy to use Web interface, command line
tools, and/or a full-featured query based API. tools, and/or a full-featured query based API.
For more information on Apache CloudStack, please visit the [website](http://cloudstack.apache.org) For more information on Apache CloudStack, please visit the [website](https://cloudstack.apache.org)
## Who Uses CloudStack? ## Who Uses CloudStack?
@ -78,10 +125,10 @@ via GitHub pull requests.
## Getting Involved and Contributing ## Getting Involved and Contributing
Interested in helping out with Apache CloudStack? Great! We welcome Interested in helping out with Apache CloudStack? Great! We welcome
participation from anybody willing to work [The Apache Way](http://theapacheway.com) and make a participation from anybody willing to work [The Apache Way](https://theapacheway.com) and make a
contribution. Note that you do not have to be a developer in order to contribute contribution. Note that you do not have to be a developer in order to contribute
to Apache CloudStack. We need folks to help with documentation, translation, to Apache CloudStack. We need folks to help with documentation, translation,
promotion etc. See our contribution [page](http://cloudstack.apache.org/contribute.html). promotion etc. See our contribution [page](https://cloudstack.apache.org/contribute.html).
If you are a frequent contributors, you can request to be added as collaborators If you are a frequent contributors, you can request to be added as collaborators
(see https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features#Git.asf.yamlfeatures-AssigningexternalcollaboratorswiththetriageroleonGitHub) (see https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features#Git.asf.yamlfeatures-AssigningexternalcollaboratorswiththetriageroleonGitHub)
@ -92,7 +139,7 @@ You may do so by sharing your GitHub users ID or raise a GitHub issue.
If you're interested in learning more or participating in the Apache CloudStack If you're interested in learning more or participating in the Apache CloudStack
project, the mailing lists are the best way to do that. While the project has project, the mailing lists are the best way to do that. While the project has
several communications channels, the [mailing lists](http://cloudstack.apache.org/mailing-lists.html) are the most active and the several communications channels, the [mailing lists](https://cloudstack.apache.org/mailing-lists.html) are the most active and the
official channels for making decisions about the project itself. official channels for making decisions about the project itself.
Mailing lists: Mailing lists:
@ -112,7 +159,7 @@ released version of CloudStack, please report it to `security@apache.org` with
details about the vulnerability, how it might be exploited, and any additional details about the vulnerability, how it might be exploited, and any additional
information that might be useful. information that might be useful.
For more details, please visit our security [page](http://cloudstack.apache.org/security.html). For more details, please visit our security [page](https://cloudstack.apache.org/security.html).
## License ## License
@ -160,3 +207,11 @@ The following provides more details on the included cryptographic software:
* CloudStack makes use of the Bouncy Castle general-purpose encryption library. * CloudStack makes use of the Bouncy Castle general-purpose encryption library.
* CloudStack can optionally interact with and control OpenSwan-based VPNs. * CloudStack can optionally interact with and control OpenSwan-based VPNs.
* CloudStack has a dependency on and makes use of JSch - a java SSH2 implementation. * CloudStack has a dependency on and makes use of JSch - a java SSH2 implementation.
## Star History
[![Apache CloudStack Star History](https://api.star-history.com/svg?repos=apache/cloudstack&type=Date)](https://www.star-history.com/#apache/cloudstack&Date)
## Contributors
[![Apache CloudStack Contributors](https://contrib.rocks/image?repo=apache/cloudstack&anon=0&max=500)](https://github.com/apache/cloudstack/graphs/contributors)

View File

@ -35,7 +35,7 @@ for pythonpath in (
from cloudutils.cloudException import CloudRuntimeException, CloudInternalException from cloudutils.cloudException import CloudRuntimeException, CloudInternalException
from cloudutils.utilities import initLoging, bash from cloudutils.utilities import initLoging, bash
from cloudutils.configFileOps import configFileOps from cloudutils.configFileOps import configFileOps
from cloudutils.globalEnv import globalEnv from cloudutils.globalEnv import globalEnv
from cloudutils.networkConfig import networkConfig from cloudutils.networkConfig import networkConfig
from cloudutils.syscfg import sysConfigFactory from cloudutils.syscfg import sysConfigFactory
@ -43,35 +43,41 @@ from cloudutils.serviceConfig import configureLibvirtConfig, configure_libvirt_t
from optparse import OptionParser from optparse import OptionParser
def getUserInputs(): def getUserInputs():
print("Welcome to the CloudStack Agent Setup:") print("Welcome to the CloudStack Agent Setup:")
cfo = configFileOps("@AGENTSYSCONFDIR@/agent.properties") cfo = configFileOps("@AGENTSYSCONFDIR@/agent.properties")
oldMgt = cfo.getEntry("host") oldMgt = cfo.getEntry("host")
mgtSvr = input("Please input the Management Server Hostname/IP-Address:[%s]"%oldMgt) mgtSvr = input(
"Please input the Management Server Hostname/IP-Address:[%s]" % oldMgt
)
if mgtSvr == "": if mgtSvr == "":
mgtSvr = oldMgt mgtSvr = oldMgt
try: try:
socket.getaddrinfo(mgtSvr, 443) socket.getaddrinfo(mgtSvr, 443)
except: except:
print("Failed to resolve %s. Please input a valid hostname or IP-Address."%mgtSvr) print(
"Failed to resolve %s. Please input a valid hostname or IP-Address."
% mgtSvr
)
exit(1) exit(1)
oldToken = cfo.getEntry("zone") oldToken = cfo.getEntry("zone")
zoneToken = input("Please input the Zone Id:[%s]"%oldToken) zoneToken = input("Please input the Zone Id:[%s]" % oldToken)
if zoneToken == "": if zoneToken == "":
zoneToken = oldToken zoneToken = oldToken
oldPod = cfo.getEntry("pod") oldPod = cfo.getEntry("pod")
podId = input("Please input the Pod Id:[%s]"%oldPod) podId = input("Please input the Pod Id:[%s]" % oldPod)
if podId == "": if podId == "":
podId = oldToken podId = oldToken
oldCluster = cfo.getEntry("cluster") oldCluster = cfo.getEntry("cluster")
clusterId = input("Please input the Cluster Id:[%s]"%oldCluster) clusterId = input("Please input the Cluster Id:[%s]" % oldCluster)
if clusterId == "": if clusterId == "":
clusterId = oldCluster clusterId = oldCluster
@ -79,18 +85,20 @@ def getUserInputs():
if oldHypervisor == "": if oldHypervisor == "":
oldHypervisor = "kvm" oldHypervisor = "kvm"
hypervisor = input("Please input the Hypervisor type kvm/lxc:[%s]"%oldHypervisor) hypervisor = input("Please input the Hypervisor type kvm/lxc:[%s]" % oldHypervisor)
if hypervisor == "": if hypervisor == "":
hypervisor = oldHypervisor hypervisor = oldHypervisor
try: try:
defaultNic = networkConfig.getDefaultNetwork() defaultNic = networkConfig.getDefaultNetwork()
except: except:
print("Failed to get default route. Please configure your network to have a default route") print(
"Failed to get default route. Please configure your network to have a default route"
)
exit(1) exit(1)
defNic = defaultNic.name defNic = defaultNic.name
network = input("Please choose which network used to create VM:[%s]"%defNic) network = input("Please choose which network used to create VM:[%s]" % defNic)
if network == "": if network == "":
if defNic == "": if defNic == "":
print("You need to specify one of Nic or bridge on your system") print("You need to specify one of Nic or bridge on your system")
@ -100,7 +108,8 @@ def getUserInputs():
return [mgtSvr, zoneToken, network, podId, clusterId, hypervisor] return [mgtSvr, zoneToken, network, podId, clusterId, hypervisor]
if __name__ == '__main__':
if __name__ == "__main__":
initLoging("@AGENTLOGDIR@/setup.log") initLoging("@AGENTLOGDIR@/setup.log")
glbEnv = globalEnv() glbEnv = globalEnv()
@ -108,13 +117,23 @@ if __name__ == '__main__':
glbEnv.agentMode = "Agent" glbEnv.agentMode = "Agent"
parser = OptionParser() parser = OptionParser()
parser.add_option("-a", action="store_true", dest="auto", help="auto mode") parser.add_option("-a", action="store_true", dest="auto", help="auto mode")
parser.add_option("-m", "--host", dest="mgt", help="Management server hostname or IP-Address") parser.add_option(
"-m", "--host", dest="mgt", help="Management server hostname or IP-Address"
)
parser.add_option("-z", "--zone", dest="zone", help="zone id") parser.add_option("-z", "--zone", dest="zone", help="zone id")
parser.add_option("-p", "--pod", dest="pod", help="pod id") parser.add_option("-p", "--pod", dest="pod", help="pod id")
parser.add_option("-c", "--cluster", dest="cluster", help="cluster id") parser.add_option("-c", "--cluster", dest="cluster", help="cluster id")
parser.add_option("-t", "--hypervisor", default="kvm", dest="hypervisor", help="hypervisor type") parser.add_option(
"-t", "--hypervisor", default="kvm", dest="hypervisor", help="hypervisor type"
)
parser.add_option("-g", "--guid", dest="guid", help="guid") parser.add_option("-g", "--guid", dest="guid", help="guid")
parser.add_option("-s", action="store_true", default=False, dest="secure", help="Secure and enable TLS for libvirtd") parser.add_option(
"-s",
action="store_true",
default=False,
dest="secure",
help="Secure and enable TLS for libvirtd",
)
parser.add_option("--pubNic", dest="pubNic", help="Public traffic interface") parser.add_option("--pubNic", dest="pubNic", help="Public traffic interface")
parser.add_option("--prvNic", dest="prvNic", help="Private traffic interface") parser.add_option("--prvNic", dest="prvNic", help="Private traffic interface")
parser.add_option("--guestNic", dest="guestNic", help="Guest traffic interface") parser.add_option("--guestNic", dest="guestNic", help="Guest traffic interface")
@ -140,15 +159,15 @@ if __name__ == '__main__':
glbEnv.pod = userInputs[3] glbEnv.pod = userInputs[3]
glbEnv.cluster = userInputs[4] glbEnv.cluster = userInputs[4]
glbEnv.hypervisor = userInputs[5] glbEnv.hypervisor = userInputs[5]
#generate UUID # generate UUID
glbEnv.uuid = old_config.getEntry("guid") glbEnv.uuid = old_config.getEntry("guid")
if glbEnv.uuid == "": if glbEnv.uuid == "":
glbEnv.uuid = bash("uuidgen").getStdout() glbEnv.uuid = bash("uuidgen").getStdout()
else: else:
for para, value in list(options.__dict__.items()): for para, value in list(options.__dict__.items()):
if value is None: if value is None:
print("Missing operand:%s"%para) print("Missing operand:%s" % para)
print("Try %s --help for more information"%sys.argv[0]) print("Try %s --help for more information" % sys.argv[0])
sys.exit(1) sys.exit(1)
glbEnv.uuid = options.guid glbEnv.uuid = options.guid
@ -168,7 +187,7 @@ if __name__ == '__main__':
try: try:
syscfg.config() syscfg.config()
print("CloudStack Agent setup is done!") print("CloudStack Agent setup is done!")
except (CloudRuntimeException,CloudInternalException) as e: except (CloudRuntimeException, CloudInternalException) as e:
print(e) print(e)
print("Try to restore your system:") print("Try to restore your system:")
try: try:

View File

@ -209,12 +209,13 @@ hypervisor.type=kvm
# the management server would send. # the management server would send.
# In case of arm64 (aarch64), this will change the machine type to 'virt' and # In case of arm64 (aarch64), this will change the machine type to 'virt' and
# adds a SCSI and a USB controller in the domain xml. # adds a SCSI and a USB controller in the domain xml.
# Possible values: x86_64 | aarch64 # Possible values: x86_64 | aarch64 | s390x
# If null (default), defaults to the VM's OS architecture # If null (default), defaults to the VM's OS architecture
#guest.cpu.arch= #guest.cpu.arch=
# This param will require CPU features on the CPU section. # Specifies required CPU features for end-user and system VMs.
# The features listed in this property must be separated by a blank space (e.g.: vmx vme) # These features must be present on the host CPU for VM deployment.
# Multiple features should be separated by whitespace (e.g.: vmx vme).
#guest.cpu.features= #guest.cpu.features=
# Disables memory ballooning on VM guests for overcommit. # Disables memory ballooning on VM guests for overcommit.
@ -441,3 +442,33 @@ iscsi.session.cleanup.enabled=false
# Wait(in seconds) during agent reconnections. When no value is set then default value of 5s will be used # Wait(in seconds) during agent reconnections. When no value is set then default value of 5s will be used
#backoff.seconds= #backoff.seconds=
# Timeout (in seconds) to wait for the snapshot reversion to complete.
# revert.snapshot.timeout=10800
# Timeout (in seconds) to wait for the incremental snapshot to complete.
# incremental.snapshot.timeout=10800
# If set to true, creates VMs as full clones of their templates on KVM hypervisor. Creates as linked clones otherwise.
# create.full.clone=false
# Instance conversion TMPDIR env var
#convert.instance.env.tmpdir=
# Instance conversion VIRT_V2V_TMPDIR env var
#convert.instance.env.virtv2v.tmpdir=
# Time, in seconds, to wait before retrying to rebase during the incremental snapshot process.
# incremental.snapshot.retry.rebase.wait=60
# Path to the VDDK library directory for VMware to KVM conversion via VDDK,
# passed to virt-v2v as -io vddk-libdir=<path>
#vddk.lib.dir=
# Ordered VDDK transport preference for VMware to KVM conversion via VDDK, passed as
# -io vddk-transports=<value> to virt-v2v. Example: nbd:nbdssl
#vddk.transports=
# Optional vCenter SHA1 thumbprint for VMware to KVM conversion via VDDK, passed as
# -io vddk-thumbprint=<value>. If unset, CloudStack computes it on the KVM host via openssl.
#vddk.thumbprint=

View File

@ -5,9 +5,9 @@
# to you under the Apache License, Version 2.0 (the # to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance # "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at # with the License. You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, # Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an # software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

View File

@ -15,6 +15,10 @@
# specific language governing permissions and limitations # specific language governing permissions and limitations
# under the License. # under the License.
class CloudStackPage(object): # Configuration file for UEFI
def __init__():
self.browser = None guest.nvram.template.legacy=@GUESTNVRAMTEMPLATELEGACY@
guest.loader.legacy=@GUESTLOADERLEGACY@
guest.nvram.template.secure=@GUESTNVRAMTEMPLATESECURE@
guest.loader.secure=@GUESTLOADERSECURE@
guest.nvram.path=@GUESTNVRAMPATH@

View File

@ -24,7 +24,7 @@
<parent> <parent>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloudstack</artifactId> <artifactId>cloudstack</artifactId>
<version>4.20.3.0</version> <version>4.23.0.0-SNAPSHOT</version>
</parent> </parent>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -26,6 +26,8 @@ import java.net.Socket;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.nio.channels.ClosedChannelException; import java.nio.channels.ClosedChannelException;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -57,7 +59,6 @@ import org.apache.cloudstack.utils.security.KeyStoreUtils;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.ThreadContext; import org.apache.logging.log4j.ThreadContext;
@ -69,6 +70,8 @@ import com.cloud.agent.api.Command;
import com.cloud.agent.api.CronCommand; import com.cloud.agent.api.CronCommand;
import com.cloud.agent.api.MaintainAnswer; import com.cloud.agent.api.MaintainAnswer;
import com.cloud.agent.api.MaintainCommand; import com.cloud.agent.api.MaintainCommand;
import com.cloud.agent.api.MigrateAgentConnectionAnswer;
import com.cloud.agent.api.MigrateAgentConnectionCommand;
import com.cloud.agent.api.PingAnswer; import com.cloud.agent.api.PingAnswer;
import com.cloud.agent.api.PingCommand; import com.cloud.agent.api.PingCommand;
import com.cloud.agent.api.ReadyCommand; import com.cloud.agent.api.ReadyCommand;
@ -84,6 +87,7 @@ import com.cloud.resource.ResourceStatusUpdater;
import com.cloud.resource.ServerResource; import com.cloud.resource.ServerResource;
import com.cloud.utils.NumbersUtil; import com.cloud.utils.NumbersUtil;
import com.cloud.utils.PropertiesUtil; import com.cloud.utils.PropertiesUtil;
import com.cloud.utils.StringUtils;
import com.cloud.utils.concurrency.NamedThreadFactory; import com.cloud.utils.concurrency.NamedThreadFactory;
import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.utils.exception.NioConnectionException; import com.cloud.utils.exception.NioConnectionException;
@ -337,9 +341,8 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
logger.info("Attempted to connect to the server, but received an unexpected exception, trying again...", e); logger.info("Attempted to connect to the server, but received an unexpected exception, trying again...", e);
} }
} }
shell.updateConnectedHost(); shell.updateConnectedHost(((NioClient)connection).getHost());
scavengeOldAgentObjects(); scavengeOldAgentObjects();
} }
public void stop(final String reason, final String detail) { public void stop(final String reason, final String detail) {
@ -449,22 +452,30 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
certExecutor.schedule(new PostCertificateRenewalTask(this), 5, TimeUnit.SECONDS); certExecutor.schedule(new PostCertificateRenewalTask(this), 5, TimeUnit.SECONDS);
} }
private void scheduleHostLBCheckerTask(final long checkInterval) { private void scheduleHostLBCheckerTask(final String lbAlgorithm, final long checkInterval) {
String name = "HostLBCheckerTask"; String name = "HostLBCheckerTask";
if (hostLbCheckExecutor != null && !hostLbCheckExecutor.isShutdown()) { if (hostLbCheckExecutor != null && !hostLbCheckExecutor.isShutdown()) {
logger.info("Shutting down the preferred host checker task {}", name);
hostLbCheckExecutor.shutdown(); hostLbCheckExecutor.shutdown();
try { try {
if (!hostLbCheckExecutor.awaitTermination(1, TimeUnit.SECONDS)) { if (!hostLbCheckExecutor.awaitTermination(1, TimeUnit.SECONDS)) {
hostLbCheckExecutor.shutdownNow(); hostLbCheckExecutor.shutdownNow();
} }
} catch (InterruptedException e) { } catch (InterruptedException e) {
logger.debug("Forcing {} shutdown as it did not shutdown in the desired time due to: {}", logger.debug("Forcing the preferred host checker task {} shutdown as it did not shutdown in the desired time due to: {}",
name, e.getMessage()); name, e.getMessage());
hostLbCheckExecutor.shutdownNow(); hostLbCheckExecutor.shutdownNow();
} }
} }
if (checkInterval > 0L) { if (checkInterval > 0L) {
logger.info("Scheduling preferred host task with host.lb.interval={}ms", checkInterval); if ("shuffle".equalsIgnoreCase(lbAlgorithm)) {
logger.info("Scheduling the preferred host checker task to trigger once (to apply lb algorithm '{}') after host.lb.interval={} ms", lbAlgorithm, checkInterval);
hostLbCheckExecutor = Executors.newSingleThreadScheduledExecutor((new NamedThreadFactory(name)));
hostLbCheckExecutor.schedule(new PreferredHostCheckerTask(), checkInterval, TimeUnit.MILLISECONDS);
return;
}
logger.info("Scheduling a recurring preferred host checker task with host.lb.interval={} ms", checkInterval);
hostLbCheckExecutor = Executors.newSingleThreadScheduledExecutor((new NamedThreadFactory(name))); hostLbCheckExecutor = Executors.newSingleThreadScheduledExecutor((new NamedThreadFactory(name)));
hostLbCheckExecutor.scheduleAtFixedRate(new PreferredHostCheckerTask(), checkInterval, checkInterval, hostLbCheckExecutor.scheduleAtFixedRate(new PreferredHostCheckerTask(), checkInterval, checkInterval,
TimeUnit.MILLISECONDS); TimeUnit.MILLISECONDS);
@ -538,6 +549,10 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
} }
public void sendStartup(final Link link) { public void sendStartup(final Link link) {
sendStartup(link, false);
}
public void sendStartup(final Link link, boolean transfer) {
final StartupCommand[] startup = serverResource.initialize(); final StartupCommand[] startup = serverResource.initialize();
if (startup != null) { if (startup != null) {
final String msHostList = shell.getPersistentProperty(null, "host"); final String msHostList = shell.getPersistentProperty(null, "host");
@ -545,6 +560,7 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
for (int i = 0; i < startup.length; i++) { for (int i = 0; i < startup.length; i++) {
setupStartupCommand(startup[i]); setupStartupCommand(startup[i]);
startup[i].setMSHostList(msHostList); startup[i].setMSHostList(msHostList);
startup[i].setConnectionTransferred(transfer);
commands[i] = startup[i]; commands[i] = startup[i];
} }
final Request request = new Request(id != null ? id : -1, -1, commands, false, false); final Request request = new Request(id != null ? id : -1, -1, commands, false, false);
@ -607,6 +623,46 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
return new ServerHandler(type, link, data); return new ServerHandler(type, link, data);
} }
protected void reconnect(final Link link) {
reconnect(link, null, false);
}
protected void reconnect(final Link link, String preferredMSHost, boolean forTransfer) {
if (!(forTransfer || reconnectAllowed)) {
logger.debug("Reconnect requested but it is not allowed {}", () -> getLinkLog(link));
return;
}
cancelStartupTask();
closeAndTerminateLink(link);
closeAndTerminateLink(this.link);
setLink(null);
cancelTasks();
serverResource.disconnected();
logger.info("Lost connection to host: {}. Attempting reconnection while we still have {} commands in progress.", shell.getConnectedHost(), commandsInProgress.get());
stopAndCleanupConnection(true);
String host = preferredMSHost;
if (org.apache.commons.lang3.StringUtils.isBlank(host)) {
host = shell.getNextHost();
}
List<String> avoidMSHostList = shell.getAvoidHosts();
do {
if (CollectionUtils.isEmpty(avoidMSHostList) || !avoidMSHostList.contains(host)) {
connection = new NioClient(getAgentName(), host, shell.getPort(), shell.getWorkers(), shell.getSslHandshakeTimeout(), this);
logger.info("Reconnecting to host: {}", host);
try {
connection.start();
} catch (final NioConnectionException e) {
logger.info("Attempted to re-connect to the server, but received an unexpected exception, trying again...", e);
stopAndCleanupConnection(false);
}
}
shell.getBackoffAlgorithm().waitBeforeRetry();
host = shell.getNextHost();
} while (!connection.isStartup());
shell.updateConnectedHost(((NioClient)connection).getHost());
logger.info("Connected to the host: {}", shell.getConnectedHost());
}
protected void closeAndTerminateLink(final Link link) { protected void closeAndTerminateLink(final Link link) {
if (link == null) { if (link == null) {
return; return;
@ -633,35 +689,6 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
} while (connection.isStartup()); } while (connection.isStartup());
} }
protected void reconnect(final Link link) {
if (!reconnectAllowed) {
logger.debug("Reconnect requested but it is not allowed {}", () -> getLinkLog(link));
return;
}
cancelStartupTask();
closeAndTerminateLink(link);
closeAndTerminateLink(this.link);
setLink(null);
cancelTasks();
serverResource.disconnected();
logger.info("Lost connection to host: {}. Attempting reconnection while we still have {} commands in progress.", shell.getConnectedHost(), commandsInProgress.get());
stopAndCleanupConnection(true);
do {
final String host = shell.getNextHost();
connection = new NioClient(getAgentName(), host, shell.getPort(), shell.getWorkers(), shell.getSslHandshakeTimeout(), this);
logger.info("Reconnecting to host: {}", host);
try {
connection.start();
} catch (final NioConnectionException e) {
logger.info("Attempted to re-connect to the server, but received an unexpected exception, trying again...", e);
stopAndCleanupConnection(false);
}
shell.getBackoffAlgorithm().waitBeforeRetry();
} while (!connection.isStartup());
shell.updateConnectedHost();
logger.info("Connected to the host: {}", shell.getConnectedHost());
}
public void processStartupAnswer(final Answer answer, final Response response, final Link link) { public void processStartupAnswer(final Answer answer, final Response response, final Link link) {
boolean answerValid = cancelStartupTask(); boolean answerValid = cancelStartupTask();
final StartupAnswer startup = (StartupAnswer)answer; final StartupAnswer startup = (StartupAnswer)answer;
@ -708,6 +735,9 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
final Command cmd = cmds[i]; final Command cmd = cmds[i];
Answer answer; Answer answer;
try { try {
if (cmd.getContextParam("logid") != null) {
ThreadContext.put("logcontextid", cmd.getContextParam("logid"));
}
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
if (!requestLogged) // ensures request is logged only once per method call if (!requestLogged) // ensures request is logged only once per method call
{ {
@ -769,12 +799,17 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
} }
} else if (cmd instanceof SetupMSListCommand) { } else if (cmd instanceof SetupMSListCommand) {
answer = setupManagementServerList((SetupMSListCommand) cmd); answer = setupManagementServerList((SetupMSListCommand) cmd);
} else if (cmd instanceof MigrateAgentConnectionCommand) {
answer = migrateAgentToOtherMS((MigrateAgentConnectionCommand) cmd);
} else { } else {
if (cmd instanceof ReadyCommand) { if (cmd instanceof ReadyCommand) {
processReadyCommand(cmd); processReadyCommand(cmd);
} }
commandsInProgress.incrementAndGet(); commandsInProgress.incrementAndGet();
try { try {
if (cmd.isReconcile()) {
cmd.setRequestSequence(request.getSequence());
}
answer = serverResource.executeRequest(cmd); answer = serverResource.executeRequest(cmd);
} finally { } finally {
commandsInProgress.decrementAndGet(); commandsInProgress.decrementAndGet();
@ -900,7 +935,7 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
return new SetupCertificateAnswer(true); return new SetupCertificateAnswer(true);
} }
private void processManagementServerList(final List<String> msList, final String lbAlgorithm, final Long lbCheckInterval) { private void processManagementServerList(final List<String> msList, final List<String> avoidMsList, final String lbAlgorithm, final Long lbCheckInterval, final boolean triggerHostLB) {
if (CollectionUtils.isNotEmpty(msList) && StringUtils.isNotEmpty(lbAlgorithm)) { if (CollectionUtils.isNotEmpty(msList) && StringUtils.isNotEmpty(lbAlgorithm)) {
try { try {
final String newMSHosts = String.format("%s%s%s", com.cloud.utils.StringUtils.toCSVList(msList), IAgentShell.hostLbAlgorithmSeparator, lbAlgorithm); final String newMSHosts = String.format("%s%s%s", com.cloud.utils.StringUtils.toCSVList(msList), IAgentShell.hostLbAlgorithmSeparator, lbAlgorithm);
@ -912,18 +947,73 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
throw new CloudRuntimeException("Could not persist received management servers list", e); throw new CloudRuntimeException("Could not persist received management servers list", e);
} }
} }
if ("shuffle".equals(lbAlgorithm)) { shell.setAvoidHosts(avoidMsList);
scheduleHostLBCheckerTask(0); if (triggerHostLB) {
} else { logger.info("Triggering the preferred host checker task now");
scheduleHostLBCheckerTask(shell.getLbCheckerInterval(lbCheckInterval)); ScheduledExecutorService hostLbExecutor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("HostLB-Executor"));
hostLbExecutor.schedule(new PreferredHostCheckerTask(), 0, TimeUnit.MILLISECONDS);
hostLbExecutor.shutdown();
} }
scheduleHostLBCheckerTask(lbAlgorithm, shell.getLbCheckerInterval(lbCheckInterval));
} }
private Answer setupManagementServerList(final SetupMSListCommand cmd) { private Answer setupManagementServerList(final SetupMSListCommand cmd) {
processManagementServerList(cmd.getMsList(), cmd.getLbAlgorithm(), cmd.getLbCheckInterval()); processManagementServerList(cmd.getMsList(), cmd.getAvoidMsList(), cmd.getLbAlgorithm(), cmd.getLbCheckInterval(), cmd.getTriggerHostLb());
return new SetupMSListAnswer(true); return new SetupMSListAnswer(true);
} }
private Answer migrateAgentToOtherMS(final MigrateAgentConnectionCommand cmd) {
try {
if (CollectionUtils.isNotEmpty(cmd.getMsList())) {
processManagementServerList(cmd.getMsList(), cmd.getAvoidMsList(), cmd.getLbAlgorithm(), cmd.getLbCheckInterval(), false);
}
ScheduledExecutorService migrateAgentConnectionService = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("MigrateAgentConnection-Job"));
migrateAgentConnectionService.schedule(() -> {
migrateAgentConnection(cmd.getAvoidMsList());
}, 3, TimeUnit.SECONDS);
migrateAgentConnectionService.shutdown();
} catch (Exception e) {
String errMsg = "Migrate agent connection failed, due to " + e.getMessage();
logger.debug(errMsg, e);
return new MigrateAgentConnectionAnswer(errMsg);
}
return new MigrateAgentConnectionAnswer(true);
}
private void migrateAgentConnection(List<String> avoidMsList) {
final String[] msHosts = shell.getHosts();
if (msHosts == null || msHosts.length < 1) {
throw new CloudRuntimeException("Management Server hosts empty, not properly configured in agent");
}
List<String> msHostsList = new ArrayList<>(Arrays.asList(msHosts));
msHostsList.removeAll(avoidMsList);
if (msHostsList.isEmpty() || StringUtils.isEmpty(msHostsList.get(0))) {
throw new CloudRuntimeException("No other Management Server hosts to migrate");
}
String preferredMSHost = null;
for (String msHost : msHostsList) {
try (final Socket socket = new Socket()) {
socket.connect(new InetSocketAddress(msHost, shell.getPort()), 5000);
preferredMSHost = msHost;
break;
} catch (final IOException e) {
throw new CloudRuntimeException("Management server host: " + msHost + " is not reachable, to migrate connection");
}
}
if (preferredMSHost == null) {
throw new CloudRuntimeException("Management server host(s) are not reachable, to migrate connection");
}
logger.debug("Management server host " + preferredMSHost + " is found to be reachable, trying to reconnect");
shell.resetHostCounter();
shell.setAvoidHosts(avoidMsList);
shell.setConnectionTransfer(true);
reconnect(link, preferredMSHost, true);
}
public void processResponse(final Response response, final Link link) { public void processResponse(final Response response, final Link link) {
final Answer answer = response.getAnswer(); final Answer answer = response.getAnswer();
logger.debug("Received response: {}", response.toString()); logger.debug("Received response: {}", response.toString());
@ -934,14 +1024,23 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
for (final IAgentControlListener listener : controlListeners) { for (final IAgentControlListener listener : controlListeners) {
listener.processControlResponse(response, (AgentControlAnswer)answer); listener.processControlResponse(response, (AgentControlAnswer)answer);
} }
} else if (answer instanceof PingAnswer && (((PingAnswer) answer).isSendStartup()) && reconnectAllowed) { } else if (answer instanceof PingAnswer) {
logger.info("Management server requested startup command to reinitialize the agent"); processPingAnswer((PingAnswer) answer);
sendStartup(link);
} else { } else {
updateLastPingResponseTime(); updateLastPingResponseTime();
} }
} }
private void processPingAnswer(final PingAnswer answer) {
if ((answer.isSendStartup()) && reconnectAllowed) {
logger.info("Management server requested startup command to reinitialize the agent");
sendStartup(link);
} else {
serverResource.processPingAnswer((PingAnswer) answer);
}
shell.setAvoidHosts(answer.getAvoidMsList());
}
public void processReadyCommand(final Command cmd) { public void processReadyCommand(final Command cmd) {
final ReadyCommand ready = (ReadyCommand)cmd; final ReadyCommand ready = (ReadyCommand)cmd;
// Set human readable sizes; // Set human readable sizes;
@ -958,7 +1057,7 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
} }
verifyAgentArch(ready.getArch()); verifyAgentArch(ready.getArch());
processManagementServerList(ready.getMsHostList(), ready.getLbAlgorithm(), ready.getLbCheckInterval()); processManagementServerList(ready.getMsHostList(), ready.getAvoidMsHostList(), ready.getLbAlgorithm(), ready.getLbCheckInterval(), false);
logger.info("Ready command is processed for agent [id: {}, uuid: {}, name: {}]", getId(), getUuid(), getName()); logger.info("Ready command is processed for agent [id: {}, uuid: {}, name: {}]", getId(), getUuid(), getName());
} }
@ -1004,6 +1103,9 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
Answer answer = null; Answer answer = null;
commandsInProgress.incrementAndGet(); commandsInProgress.incrementAndGet();
try { try {
if (command.isReconcile()) {
command.setRequestSequence(req.getSequence());
}
answer = serverResource.executeRequest(command); answer = serverResource.executeRequest(command);
} finally { } finally {
commandsInProgress.decrementAndGet(); commandsInProgress.decrementAndGet();
@ -1127,12 +1229,12 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
public class WatchTask implements Runnable { public class WatchTask implements Runnable {
protected Request _request; protected Request _request;
protected Agent _agent; protected Agent _agent;
protected Link _link; protected Link link;
public WatchTask(final Link link, final Request request, final Agent agent) { public WatchTask(final Link link, final Request request, final Agent agent) {
super(); super();
_request = request; _request = request;
_link = link; this.link = link;
_agent = agent; _agent = agent;
} }
@ -1141,9 +1243,9 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
logger.trace("Scheduling {}", (_request instanceof Response ? "Ping" : "Watch Task")); logger.trace("Scheduling {}", (_request instanceof Response ? "Ping" : "Watch Task"));
try { try {
if (_request instanceof Response) { if (_request instanceof Response) {
outRequestHandler.submit(new ServerHandler(Task.Type.OTHER, _link, _request)); outRequestHandler.submit(new ServerHandler(Task.Type.OTHER, link, _request));
} else { } else {
_link.schedule(new ServerHandler(Task.Type.OTHER, _link, _request)); link.schedule(new ServerHandler(Task.Type.OTHER, link, _request));
} }
} catch (final ClosedChannelException e) { } catch (final ClosedChannelException e) {
logger.warn("Unable to schedule task because channel is closed"); logger.warn("Unable to schedule task because channel is closed");
@ -1152,12 +1254,12 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
} }
public class StartupTask implements Runnable { public class StartupTask implements Runnable {
protected Link _link; protected Link link;
private final AtomicBoolean cancelled = new AtomicBoolean(false); private final AtomicBoolean cancelled = new AtomicBoolean(false);
public StartupTask(final Link link) { public StartupTask(final Link link) {
logger.debug("Startup task created"); logger.debug("Startup task created");
_link = link; this.link = link;
} }
public boolean cancel() { public boolean cancel() {
@ -1175,8 +1277,8 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
logger.info("The running startup command is now invalid. Attempting reconnect"); logger.info("The running startup command is now invalid. Attempting reconnect");
startupTask.set(null); startupTask.set(null);
startupWait = DEFAULT_STARTUP_WAIT * 2; startupWait = DEFAULT_STARTUP_WAIT * 2;
logger.debug("Executing reconnect from task - {}", () -> getLinkLog(_link)); logger.debug("Executing reconnect from task - {}", () -> getLinkLog(link));
reconnect(_link); reconnect(link);
} }
} }
} }
@ -1209,7 +1311,8 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
if (task.getType() == Task.Type.CONNECT) { if (task.getType() == Task.Type.CONNECT) {
shell.getBackoffAlgorithm().reset(); shell.getBackoffAlgorithm().reset();
setLink(task.getLink()); setLink(task.getLink());
sendStartup(task.getLink()); sendStartup(task.getLink(), shell.isConnectionTransfer());
shell.setConnectionTransfer(false);
} else if (task.getType() == Task.Type.DATA) { } else if (task.getType() == Task.Type.DATA) {
Request request; Request request;
try { try {
@ -1219,7 +1322,6 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
processResponse((Response)request, task.getLink()); processResponse((Response)request, task.getLink());
} else { } else {
//put the requests from mgt server into another thread pool, as the request may take a longer time to finish. Don't block the NIO main thread pool //put the requests from mgt server into another thread pool, as the request may take a longer time to finish. Don't block the NIO main thread pool
//processRequest(request, task.getLink());
requestHandler.submit(new AgentRequestHandler(getType(), getLink(), request)); requestHandler.submit(new AgentRequestHandler(getType(), getLink(), request));
} }
} catch (final ClassNotFoundException e) { } catch (final ClassNotFoundException e) {
@ -1235,6 +1337,7 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
Thread.sleep(5000); Thread.sleep(5000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
} }
shell.setConnectionTransfer(false);
logger.debug("Executing disconnect task - {} and reconnecting", () -> getLinkLog(task.getLink())); logger.debug("Executing disconnect task - {} and reconnecting", () -> getLinkLog(task.getLink()));
reconnect(task.getLink()); reconnect(task.getLink());
} else if (task.getType() == Task.Type.OTHER) { } else if (task.getType() == Task.Type.OTHER) {
@ -1304,26 +1407,26 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
if (msList == null || msList.length < 1) { if (msList == null || msList.length < 1) {
return; return;
} }
final String preferredHost = msList[0]; final String preferredMSHost = msList[0];
final String connectedHost = shell.getConnectedHost(); final String connectedHost = shell.getConnectedHost();
logger.debug("Running preferred host checker task, connected host={}, preferred host={}", logger.debug("Running preferred host checker task, connected host={}, preferred host={}",
connectedHost, preferredHost); connectedHost, preferredMSHost);
if (preferredHost == null || preferredHost.equals(connectedHost) || link == null) { if (preferredMSHost == null || preferredMSHost.equals(connectedHost) || link == null) {
return; return;
} }
boolean isHostUp = false; boolean isHostUp = false;
try (final Socket socket = new Socket()) { try (final Socket socket = new Socket()) {
socket.connect(new InetSocketAddress(preferredHost, shell.getPort()), 5000); socket.connect(new InetSocketAddress(preferredMSHost, shell.getPort()), 5000);
isHostUp = true; isHostUp = true;
} catch (final IOException e) { } catch (final IOException e) {
logger.debug("Host: {} is not reachable", preferredHost); logger.debug("Host: {} is not reachable", preferredMSHost);
} }
if (isHostUp && link != null && commandsInProgress.get() == 0) { if (isHostUp && link != null && commandsInProgress.get() == 0) {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("Preferred host {} is found to be reachable, trying to reconnect", preferredHost); logger.debug("Preferred host {} is found to be reachable, trying to reconnect", preferredMSHost);
} }
shell.resetHostCounter(); shell.resetHostCounter();
reconnect(link); reconnect(link, preferredMSHost, false);
} }
} catch (Throwable t) { } catch (Throwable t) {
logger.error("Error caught while attempting to connect to preferred host", t); logger.error("Error caught while attempting to connect to preferred host", t);

View File

@ -66,6 +66,7 @@ public class AgentShell implements IAgentShell, Daemon {
private String _zone; private String _zone;
private String _pod; private String _pod;
private String _host; private String _host;
private List<String> _avoidHosts;
private String _privateIp; private String _privateIp;
private int _port; private int _port;
private int _proxyPort; private int _proxyPort;
@ -76,9 +77,9 @@ public class AgentShell implements IAgentShell, Daemon {
private volatile boolean _exit = false; private volatile boolean _exit = false;
private int _pingRetries; private int _pingRetries;
private final List<Agent> _agents = new ArrayList<Agent>(); private final List<Agent> _agents = new ArrayList<Agent>();
private String hostToConnect;
private String connectedHost; private String connectedHost;
private Long preferredHostCheckInterval; private Long preferredHostCheckInterval;
private boolean connectionTransfer = false;
protected AgentProperties agentProperties = new AgentProperties(); protected AgentProperties agentProperties = new AgentProperties();
public AgentShell() { public AgentShell() {
@ -120,7 +121,7 @@ public class AgentShell implements IAgentShell, Daemon {
if (_hostCounter >= hosts.length) { if (_hostCounter >= hosts.length) {
_hostCounter = 0; _hostCounter = 0;
} }
hostToConnect = hosts[_hostCounter % hosts.length]; String hostToConnect = hosts[_hostCounter % hosts.length];
_hostCounter++; _hostCounter++;
return hostToConnect; return hostToConnect;
} }
@ -142,11 +143,10 @@ public class AgentShell implements IAgentShell, Daemon {
} }
@Override @Override
public void updateConnectedHost() { public void updateConnectedHost(String connectedHost) {
connectedHost = hostToConnect; this.connectedHost = connectedHost;
} }
@Override @Override
public void resetHostCounter() { public void resetHostCounter() {
_hostCounter = 0; _hostCounter = 0;
@ -165,6 +165,16 @@ public class AgentShell implements IAgentShell, Daemon {
} }
} }
@Override
public void setAvoidHosts(List<String> avoidHosts) {
_avoidHosts = avoidHosts;
}
@Override
public List<String> getAvoidHosts() {
return _avoidHosts;
}
@Override @Override
public String getPrivateIp() { public String getPrivateIp() {
return _privateIp; return _privateIp;
@ -217,6 +227,14 @@ public class AgentShell implements IAgentShell, Daemon {
_storage.persist(name, value); _storage.persist(name, value);
} }
public boolean isConnectionTransfer() {
return connectionTransfer;
}
public void setConnectionTransfer(boolean connectionTransfer) {
this.connectionTransfer = connectionTransfer;
}
void loadProperties() throws ConfigurationException { void loadProperties() throws ConfigurationException {
final File file = PropertiesUtil.findConfigFile("agent.properties"); final File file = PropertiesUtil.findConfigFile("agent.properties");

View File

@ -16,6 +16,7 @@
// under the License. // under the License.
package com.cloud.agent; package com.cloud.agent;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
@ -63,13 +64,21 @@ public interface IAgentShell {
String[] getHosts(); String[] getHosts();
void setAvoidHosts(List<String> hosts);
List<String> getAvoidHosts();
long getLbCheckerInterval(Long receivedLbInterval); long getLbCheckerInterval(Long receivedLbInterval);
void updateConnectedHost(); void updateConnectedHost(String connectedHost);
String getConnectedHost(); String getConnectedHost();
void launchNewAgent(ServerResource resource) throws ConfigurationException; void launchNewAgent(ServerResource resource) throws ConfigurationException;
boolean isConnectionTransfer();
void setConnectionTransfer(boolean connectionTransfer);
Integer getSslHandshakeTimeout(); Integer getSslHandshakeTimeout();
} }

View File

@ -117,7 +117,7 @@ public class AgentProperties{
/** /**
* Local storage path.<br> * Local storage path.<br>
* This property allows multiple values to be entered in a single String. The differente values must be separated by commas.<br> * This property allows multiple values to be entered in a single String. The different values must be separated by commas.<br>
* Data type: String.<br> * Data type: String.<br>
* Default value: <code>/var/lib/libvirt/images/</code> * Default value: <code>/var/lib/libvirt/images/</code>
*/ */
@ -134,7 +134,7 @@ public class AgentProperties{
/** /**
* MANDATORY: The UUID for the local storage pool.<br> * MANDATORY: The UUID for the local storage pool.<br>
* This property allows multiple values to be entered in a single String. The differente values must be separated by commas.<br> * This property allows multiple values to be entered in a single String. The different values must be separated by commas.<br>
* Data type: String.<br> * Data type: String.<br>
* Default value: <code>null</code> * Default value: <code>null</code>
*/ */
@ -155,6 +155,14 @@ public class AgentProperties{
*/ */
public static final Property<Integer> CMDS_TIMEOUT = new Property<>("cmds.timeout", 7200); public static final Property<Integer> CMDS_TIMEOUT = new Property<>("cmds.timeout", 7200);
/**
* The timeout (in seconds) for the snapshot merge operation, mainly used for classic volume snapshots and disk-only VM snapshots on file-based storage.<br>
* This configuration is only considered if libvirt.events.enabled is also true. <br>
* Data type: Integer.<br>
* Default value: <code>259200</code>
*/
public static final Property<Integer> QCOW2_DELTA_MERGE_TIMEOUT = new Property<>("qcow2.delta.merge.timeout", 60 * 60 * 72);
/** /**
* This parameter sets the VM migration speed (in mbps). The default value is -1,<br> * This parameter sets the VM migration speed (in mbps). The default value is -1,<br>
* which means that the agent will try to guess the speed of the guest network and consume all possible bandwidth.<br> * which means that the agent will try to guess the speed of the guest network and consume all possible bandwidth.<br>
@ -213,6 +221,15 @@ public class AgentProperties{
*/ */
public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_XML_TRANSFORMER_SCRIPT = new Property<>("agent.hooks.libvirt_vm_xml_transformer.script", "libvirt-vm-xml-transformer.groovy"); public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_XML_TRANSFORMER_SCRIPT = new Property<>("agent.hooks.libvirt_vm_xml_transformer.script", "libvirt-vm-xml-transformer.groovy");
/**
* This property is used with the agent.hooks.basedir property to define the Libvirt VM XML transformer shell script.<br>
* The shell script is used to execute the Libvirt VM XML transformer script.<br>
* For more information see the agent.properties file.<br>
* Data type: String.<br>
* Default value: <code>libvirt-vm-xml-transformer.sh</code>
*/
public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_XML_TRANSFORMER_SHELL_SCRIPT = new Property<>("agent.hooks.libvirt_vm_xml_transformer.shell_script", "libvirt-vm-xml-transformer.sh");
/** /**
* This property is used with the agent.hooks.basedir and agent.hooks.libvirt_vm_xml_transformer.script properties to define the Libvirt VM XML transformer method.<br> * This property is used with the agent.hooks.basedir and agent.hooks.libvirt_vm_xml_transformer.script properties to define the Libvirt VM XML transformer method.<br>
* Libvirt XML transformer hook does XML-to-XML transformation.<br> * Libvirt XML transformer hook does XML-to-XML transformation.<br>
@ -233,6 +250,15 @@ public class AgentProperties{
*/ */
public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_ON_START_SCRIPT = new Property<>("agent.hooks.libvirt_vm_on_start.script", "libvirt-vm-state-change.groovy"); public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_ON_START_SCRIPT = new Property<>("agent.hooks.libvirt_vm_on_start.script", "libvirt-vm-state-change.groovy");
/**
* This property is used with the agent.hooks.basedir property to define the Libvirt VM on start shell script.<br>
* The shell script is used to execute the Libvirt VM on start script.<br>
* For more information see the agent.properties file.<br>
* Data type: String.<br>
* Default value: <code>libvirt-vm-state-change.sh</code>
*/
public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_ON_START_SHELL_SCRIPT = new Property<>("agent.hooks.libvirt_vm_on_start.shell_script", "libvirt-vm-state-change.sh");
/** /**
* This property is used with the agent.hooks.basedir and agent.hooks.libvirt_vm_on_start.script properties to define the Libvirt VM on start method.<br> * This property is used with the agent.hooks.basedir and agent.hooks.libvirt_vm_on_start.script properties to define the Libvirt VM on start method.<br>
* The hook is called right after Libvirt successfully launched the VM.<br> * The hook is called right after Libvirt successfully launched the VM.<br>
@ -252,6 +278,15 @@ public class AgentProperties{
*/ */
public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_ON_STOP_SCRIPT = new Property<>("agent.hooks.libvirt_vm_on_stop.script", "libvirt-vm-state-change.groovy"); public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_ON_STOP_SCRIPT = new Property<>("agent.hooks.libvirt_vm_on_stop.script", "libvirt-vm-state-change.groovy");
/**
* This property is used with the agent.hooks.basedir property to define the Libvirt VM on stop shell script.<br>
* The shell script is used to execute the Libvirt VM on stop script.<br>
* For more information see the agent.properties file.<br>
* Data type: String.<br>
* Default value: <code>libvirt-vm-state-change.sh</code>
*/
public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_ON_STOP_SHELL_SCRIPT = new Property<>("agent.hooks.libvirt_vm_on_stop.shell_script", "libvirt-vm-state-change.sh");
/** /**
* This property is used with the agent.hooks.basedir and agent.hooks.libvirt_vm_on_stop.script properties to define the Libvirt VM on stop method.<br> * This property is used with the agent.hooks.basedir and agent.hooks.libvirt_vm_on_stop.script properties to define the Libvirt VM on stop method.<br>
* The hook is called right after libvirt successfully stopped the VM.<br> * The hook is called right after libvirt successfully stopped the VM.<br>
@ -383,15 +418,16 @@ public class AgentProperties{
/** /**
* This param will set the CPU architecture for the domain to override what the management server would send.<br> * This param will set the CPU architecture for the domain to override what the management server would send.<br>
* In case of arm64 (aarch64), this will change the machine type to 'virt' and add a SCSI and a USB controller in the domain XML.<br> * In case of arm64 (aarch64), this will change the machine type to 'virt' and add a SCSI and a USB controller in the domain XML.<br>
* Possible values: x86_64 | aarch64 <br> * Possible values: x86_64 | aarch64 | s390x <br>
* Data type: String.<br> * Data type: String.<br>
* Default value: <code>null</code> (will set use the architecture of the VM's OS). * Default value: <code>null</code> (will set use the architecture of the VM's OS).
*/ */
public static final Property<String> GUEST_CPU_ARCH = new Property<>("guest.cpu.arch", null, String.class); public static final Property<String> GUEST_CPU_ARCH = new Property<>("guest.cpu.arch", null, String.class);
/** /**
* This param will require CPU features on the CPU section.<br> * Specifies required CPU features for end-user and system VMs.<br>
* The features listed in this property must be separated by a blank space (see example below).<br> * These features must be present on the host CPU for VM deployment.<br>
* Multiple features should be separated by whitespace (see example below).<br>
* Possible values: vmx vme <br> * Possible values: vmx vme <br>
* Data type: String.<br> * Data type: String.<br>
* Default value: <code>null</code> * Default value: <code>null</code>
@ -758,6 +794,44 @@ public class AgentProperties{
*/ */
public static final Property<Boolean> VIRTV2V_VERBOSE_ENABLED = new Property<>("virtv2v.verbose.enabled", false); public static final Property<Boolean> VIRTV2V_VERBOSE_ENABLED = new Property<>("virtv2v.verbose.enabled", false);
/**
* Set env TMPDIR var for virt-v2v Instance Conversion from VMware to KVM
* Data type: String.<br>
* Default value: <code>null</code>
*/
public static final Property<String> CONVERT_ENV_TMPDIR = new Property<>("convert.instance.env.tmpdir", null, String.class);
/**
* Set env VIRT_V2V_TMPDIR var for virt-v2v Instance Conversion from VMware to KVM
* Data type: String.<br>
* Default value: <code>null</code>
*/
public static final Property<String> CONVERT_ENV_VIRTV2V_TMPDIR = new Property<>("convert.instance.env.virtv2v.tmpdir", null, String.class);
/**
* Path to the VDDK library directory on the KVM conversion host, used when converting VMs from VMware to KVM via VDDK.
* This directory is passed to virt-v2v as <code>-io vddk-libdir=&lt;path&gt;</code>.
* Data type: String.<br>
* Default value: <code>null</code>
*/
public static final Property<String> VDDK_LIB_DIR = new Property<>("vddk.lib.dir", null, String.class);
/**
* Ordered list of VDDK transports for virt-v2v, passed as <code>-io vddk-transports=&lt;value&gt;</code>.
* Example: <code>nbd:nbdssl</code>.
* Data type: String.<br>
* Default value: <code>null</code>
*/
public static final Property<String> VDDK_TRANSPORTS = new Property<>("vddk.transports", null, String.class);
/**
* vCenter TLS certificate thumbprint used by virt-v2v VDDK mode, passed as <code>-io vddk-thumbprint=&lt;value&gt;</code>.
* If unset, the KVM host computes it at runtime from the vCenter endpoint.
* Data type: String.<br>
* Default value: <code>null</code>
*/
public static final Property<String> VDDK_THUMBPRINT = new Property<>("vddk.thumbprint", null, String.class);
/** /**
* BGP controll CIDR * BGP controll CIDR
* Data type: String.<br> * Data type: String.<br>
@ -816,7 +890,30 @@ public class AgentProperties{
* Data type: Integer.<br> * Data type: Integer.<br>
* Default value: <code>null</code> * Default value: <code>null</code>
*/ */
public static final Property<Integer> SSL_HANDSHAKE_TIMEOUT = new Property<>("ssl.handshake.timeout", null, Integer.class); public static final Property<Integer> SSL_HANDSHAKE_TIMEOUT = new Property<>("ssl.handshake.timeout", 30, Integer.class);
/**
* Timeout (in seconds) to wait for the incremental snapshot to complete.
* */
public static final Property<Integer> INCREMENTAL_SNAPSHOT_TIMEOUT = new Property<>("incremental.snapshot.timeout", 10800);
/**
* Timeout (in seconds) to wait for the snapshot reversion to complete.
* */
public static final Property<Integer> REVERT_SNAPSHOT_TIMEOUT = new Property<>("revert.snapshot.timeout", 10800);
/**
* If set to true, creates VMs as full clones of their templates on KVM hypervisor. Creates as linked clones otherwise. <br>
* Data type: Boolean. <br>
* Default value: <code>false</code>
*/
public static final Property<Boolean> CREATE_FULL_CLONE = new Property<>("create.full.clone", false);
/**
* Time, in seconds, to wait before retrying to rebase during the incremental snapshot process.
* */
public static final Property<Integer> INCREMENTAL_SNAPSHOT_RETRY_REBASE_WAIT = new Property<>("incremental.snapshot.retry.rebase.wait", 60);
public static class Property <T>{ public static class Property <T>{
private String name; private String name;

View File

@ -20,7 +20,6 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.UUID;
import com.cloud.agent.IAgentControl; import com.cloud.agent.IAgentControl;
import com.cloud.agent.api.Answer; import com.cloud.agent.api.Answer;
@ -40,6 +39,7 @@ import com.cloud.resource.ServerResource;
import com.cloud.storage.Storage; import com.cloud.storage.Storage;
import com.cloud.storage.Storage.StoragePoolType; import com.cloud.storage.Storage.StoragePoolType;
import com.cloud.utils.StringUtils; import com.cloud.utils.StringUtils;
import com.cloud.utils.UuidUtils;
public class DummyResource implements ServerResource { public class DummyResource implements ServerResource {
String _name; String _name;
@ -133,7 +133,7 @@ public class DummyResource implements ServerResource {
String hostIp = getConfiguredProperty("private.ip.address", "127.0.0.1"); String hostIp = getConfiguredProperty("private.ip.address", "127.0.0.1");
String localStoragePath = getConfiguredProperty("local.storage.path", "/mnt"); String localStoragePath = getConfiguredProperty("local.storage.path", "/mnt");
String lh = hostIp + localStoragePath; String lh = hostIp + localStoragePath;
String uuid = UUID.nameUUIDFromBytes(lh.getBytes(StringUtils.getPreferredCharset())).toString(); String uuid = UuidUtils.nameUUIDFromBytes(lh.getBytes(StringUtils.getPreferredCharset())).toString();
String capacity = getConfiguredProperty("local.storage.capacity", "1000000000"); String capacity = getConfiguredProperty("local.storage.capacity", "1000000000");
String available = getConfiguredProperty("local.storage.avail", "10000000"); String available = getConfiguredProperty("local.storage.avail", "10000000");

View File

@ -397,9 +397,8 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
} }
public String authenticateConsoleAccess(String host, String port, String vmId, String sid, String ticket, public String authenticateConsoleAccess(String host, String port, String vmId, String sid, String ticket,
Boolean isReauthentication, String sessionToken) { Boolean isReauthentication, String sessionToken, String clientAddress) {
ConsoleAccessAuthenticationCommand cmd = new ConsoleAccessAuthenticationCommand(host, port, vmId, sid, ticket, sessionToken, clientAddress);
ConsoleAccessAuthenticationCommand cmd = new ConsoleAccessAuthenticationCommand(host, port, vmId, sid, ticket, sessionToken);
cmd.setReauthenticating(isReauthentication); cmd.setReauthenticating(isReauthentication);
ConsoleProxyAuthenticationResult result = new ConsoleProxyAuthenticationResult(); ConsoleProxyAuthenticationResult result = new ConsoleProxyAuthenticationResult();

View File

@ -358,7 +358,7 @@ public class AgentShellTest {
AgentShell shell = new AgentShell(); AgentShell shell = new AgentShell();
shell.setHosts("test"); shell.setHosts("test");
shell.getNextHost(); shell.getNextHost();
shell.updateConnectedHost(); shell.updateConnectedHost("test");
Assert.assertEquals(expected, shell.getConnectedHost()); Assert.assertEquals(expected, shell.getConnectedHost());
} }

View File

@ -24,7 +24,7 @@
<parent> <parent>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloudstack</artifactId> <artifactId>cloudstack</artifactId>
<version>4.20.3.0</version> <version>4.23.0.0-SNAPSHOT</version>
</parent> </parent>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -19,9 +19,10 @@ package com.cloud.agent.api;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.cloud.agent.api.LogLevel.Log4jLevel;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.cloud.agent.api.LogLevel.Log4jLevel;
/** /**
* implemented by classes that extends the Command class. Command specifies * implemented by classes that extends the Command class. Command specifies
@ -35,6 +36,23 @@ public abstract class Command {
Continue, Stop Continue, Stop
} }
public enum State {
CREATED, // Command is created by management server
STARTED, // Command is started by agent
PROCESSING, // Processing by agent
PROCESSING_IN_BACKEND, // Processing in backend by agent
COMPLETED, // Operation succeeds by agent or management server
FAILED, // Operation fails by agent
RECONCILE_RETRY, // Ready for retry of reconciliation
RECONCILING, // Being reconciled by management server
RECONCILED, // Reconciled by management server
RECONCILE_SKIPPED, // Skip the reconciliation as the resource state is inconsistent with the command
RECONCILE_FAILED, // Fail to reconcile by management server
TIMED_OUT, // Timed out on management server or agent
INTERRUPTED, // Interrupted by management server or agent (for example agent is restarted),
DANGLED_IN_BACKEND // Backend process which cannot be processed normally (for example agent is restarted)
}
public static final String HYPERVISOR_TYPE = "hypervisorType"; public static final String HYPERVISOR_TYPE = "hypervisorType";
// allow command to carry over hypervisor or other environment related context info // allow command to carry over hypervisor or other environment related context info
@ -42,6 +60,8 @@ public abstract class Command {
protected Map<String, String> contextMap = new HashMap<String, String>(); protected Map<String, String> contextMap = new HashMap<String, String>();
private int wait; //in second private int wait; //in second
private boolean bypassHostMaintenance = false; private boolean bypassHostMaintenance = false;
private transient long requestSequence = 0L;
protected Map<String, Map<String, String>> externalDetails;
protected Command() { protected Command() {
this.wait = 0; this.wait = 0;
@ -82,6 +102,10 @@ public abstract class Command {
return contextMap.get(name); return contextMap.get(name);
} }
public Map<String, String> getContextMap() {
return contextMap;
}
public boolean allowCaching() { public boolean allowCaching() {
return true; return true;
} }
@ -94,6 +118,26 @@ public abstract class Command {
this.bypassHostMaintenance = bypassHostMaintenance; this.bypassHostMaintenance = bypassHostMaintenance;
} }
public boolean isReconcile() {
return false;
}
public long getRequestSequence() {
return requestSequence;
}
public void setRequestSequence(long requestSequence) {
this.requestSequence = requestSequence;
}
public void setExternalDetails(Map<String, Map<String, String>> externalDetails) {
this.externalDetails = externalDetails;
}
public Map<String, Map<String, String>> getExternalDetails() {
return externalDetails;
}
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;

View File

@ -15,10 +15,24 @@
// specific language governing permissions and limitations // specific language governing permissions and limitations
// under the License. // under the License.
package com.cloud.agent.api; package com.cloud.agent.api;
import org.apache.cloudstack.gpu.GpuDevice;
public class VgpuTypesInfo { public class VgpuTypesInfo {
private boolean passthroughEnabled = true;
private GpuDevice.DeviceType deviceType;
private String parentBusAddress;
private String busAddress;
private String numaNode;
private String pciRoot;
private String deviceId;
private String deviceName;
private String vendorId;
private String vendorName;
private String modelName; private String modelName;
private String groupName; private String groupName;
private String vmName;
private Long maxHeads; private Long maxHeads;
private Long videoRam; private Long videoRam;
private Long maxResolutionX; private Long maxResolutionX;
@ -26,6 +40,7 @@ public class VgpuTypesInfo {
private Long maxVgpuPerGpu; private Long maxVgpuPerGpu;
private Long remainingCapacity; private Long remainingCapacity;
private Long maxCapacity; private Long maxCapacity;
private boolean display = false;
public String getModelName() { public String getModelName() {
return modelName; return modelName;
@ -39,22 +54,42 @@ public class VgpuTypesInfo {
return videoRam; return videoRam;
} }
public void setVideoRam(Long videoRam) {
this.videoRam = videoRam;
}
public Long getMaxHeads() { public Long getMaxHeads() {
return maxHeads; return maxHeads;
} }
public void setMaxHeads(Long maxHeads) {
this.maxHeads = maxHeads;
}
public Long getMaxResolutionX() { public Long getMaxResolutionX() {
return maxResolutionX; return maxResolutionX;
} }
public void setMaxResolutionX(Long maxResolutionX) {
this.maxResolutionX = maxResolutionX;
}
public Long getMaxResolutionY() { public Long getMaxResolutionY() {
return maxResolutionY; return maxResolutionY;
} }
public void setMaxResolutionY(Long maxResolutionY) {
this.maxResolutionY = maxResolutionY;
}
public Long getMaxVpuPerGpu() { public Long getMaxVpuPerGpu() {
return maxVgpuPerGpu; return maxVgpuPerGpu;
} }
public void setMaxVgpuPerGpu(Long maxVgpuPerGpu) {
this.maxVgpuPerGpu = maxVgpuPerGpu;
}
public Long getRemainingCapacity() { public Long getRemainingCapacity() {
return remainingCapacity; return remainingCapacity;
} }
@ -71,8 +106,133 @@ public class VgpuTypesInfo {
this.maxCapacity = maxCapacity; this.maxCapacity = maxCapacity;
} }
public VgpuTypesInfo(String groupName, String modelName, Long videoRam, Long maxHeads, Long maxResolutionX, Long maxResolutionY, Long maxVgpuPerGpu, public boolean isPassthroughEnabled() {
Long remainingCapacity, Long maxCapacity) { return passthroughEnabled;
}
public void setPassthroughEnabled(boolean passthroughEnabled) {
this.passthroughEnabled = passthroughEnabled;
}
public GpuDevice.DeviceType getDeviceType() {
return deviceType;
}
public void setDeviceType(GpuDevice.DeviceType deviceType) {
this.deviceType = deviceType;
}
public String getParentBusAddress() {
return parentBusAddress;
}
public void setParentBusAddress(String parentBusAddress) {
this.parentBusAddress = parentBusAddress;
}
public String getBusAddress() {
return busAddress;
}
public void setBusAddress(String busAddress) {
this.busAddress = busAddress;
}
public String getNumaNode() {
return numaNode;
}
public void setNumaNode(String numaNode) {
this.numaNode = numaNode;
}
public String getPciRoot() {
return pciRoot;
}
public void setPciRoot(String pciRoot) {
this.pciRoot = pciRoot;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public String getVendorId() {
return vendorId;
}
public void setVendorId(String vendorId) {
this.vendorId = vendorId;
}
public String getVendorName() {
return vendorName;
}
public void setVendorName(String vendorName) {
this.vendorName = vendorName;
}
public String getVmName() {
return vmName;
}
public void setVmName(String vmName) {
this.vmName = vmName;
}
public boolean isDisplay() {
return display;
}
public void setDisplay(boolean display) {
this.display = display;
}
public VgpuTypesInfo(GpuDevice.DeviceType deviceType, String groupName, String modelName, String busAddress,
String vendorId, String vendorName, String deviceId, String deviceName, String numaNode, String pciRoot
) {
this.deviceType = deviceType;
this.groupName = groupName;
this.modelName = modelName;
this.busAddress = busAddress;
this.deviceId = deviceId;
this.deviceName = deviceName;
this.vendorId = vendorId;
this.vendorName = vendorName;
this.numaNode = numaNode;
this.pciRoot = pciRoot;
}
public VgpuTypesInfo(GpuDevice.DeviceType deviceType, String groupName, String modelName, String busAddress,
String vendorId, String vendorName, String deviceId, String deviceName
) {
this.deviceType = deviceType;
this.groupName = groupName;
this.modelName = modelName;
this.busAddress = busAddress;
this.deviceId = deviceId;
this.deviceName = deviceName;
this.vendorId = vendorId;
this.vendorName = vendorName;
}
public VgpuTypesInfo(String groupName, String modelName, Long videoRam, Long maxHeads, Long maxResolutionX,
Long maxResolutionY, Long maxVgpuPerGpu, Long remainingCapacity, Long maxCapacity
) {
this.groupName = groupName; this.groupName = groupName;
this.modelName = modelName; this.modelName = modelName;
this.videoRam = videoRam; this.videoRam = videoRam;

View File

@ -119,8 +119,7 @@ public class OVFHelper {
boolean password = StringUtils.isNotBlank(passStr) && passStr.equalsIgnoreCase("true"); boolean password = StringUtils.isNotBlank(passStr) && passStr.equalsIgnoreCase("true");
String label = ovfParser.getChildNodeValue(node, "Label"); String label = ovfParser.getChildNodeValue(node, "Label");
String description = ovfParser.getChildNodeValue(node, "Description"); String description = ovfParser.getChildNodeValue(node, "Description");
logger.debug("Creating OVF property index " + index + (category == null ? "" : " for category " + category) logger.debug("Creating OVF property index {} {} with key = {}", index, (category == null ? "" : " for category " + category), key);
+ " with key = " + key);
return new OVFPropertyTO(key, type, value, qualifiers, userConfigurable, return new OVFPropertyTO(key, type, value, qualifiers, userConfigurable,
label, description, password, index, category); label, description, password, index, category);
} }
@ -152,7 +151,7 @@ public class OVFHelper {
if (child.getNodeName().equalsIgnoreCase("Category") || if (child.getNodeName().equalsIgnoreCase("Category") ||
child.getNodeName().endsWith(":Category")) { child.getNodeName().endsWith(":Category")) {
lastCategoryFound = child.getTextContent(); lastCategoryFound = child.getTextContent();
logger.info("Category found " + lastCategoryFound); logger.info("Category found {}", lastCategoryFound);
} else if (child.getNodeName().equalsIgnoreCase("Property") || } else if (child.getNodeName().equalsIgnoreCase("Property") ||
child.getNodeName().endsWith(":Property")) { child.getNodeName().endsWith(":Property")) {
OVFPropertyTO prop = createOVFPropertyFromNode(child, propertyIndex, lastCategoryFound); OVFPropertyTO prop = createOVFPropertyFromNode(child, propertyIndex, lastCategoryFound);
@ -250,13 +249,13 @@ public class OVFHelper {
int diskNumber = 0; int diskNumber = 0;
for (OVFVirtualHardwareItemTO diskItem : diskHardwareItems) { for (OVFVirtualHardwareItemTO diskItem : diskHardwareItems) {
if (StringUtils.isBlank(diskItem.getHostResource())) { if (StringUtils.isBlank(diskItem.getHostResource())) {
logger.error("Missing disk information for hardware item " + diskItem.getElementName() + " " + diskItem.getInstanceId()); logger.error("Missing disk information for hardware item {} {}", diskItem.getElementName(), diskItem.getInstanceId());
continue; continue;
} }
String diskId = extractDiskIdFromDiskHostResource(diskItem.getHostResource()); String diskId = extractDiskIdFromDiskHostResource(diskItem.getHostResource());
OVFDisk diskDefinition = getDiskDefinitionFromDiskId(diskId, disks); OVFDisk diskDefinition = getDiskDefinitionFromDiskId(diskId, disks);
if (diskDefinition == null) { if (diskDefinition == null) {
logger.error("Missing disk definition for disk ID " + diskId); logger.error("Missing disk definition for disk ID {}", diskId);
} }
OVFFile fileDefinition = getFileDefinitionFromDiskDefinition(diskDefinition._fileRef, files); OVFFile fileDefinition = getFileDefinitionFromDiskDefinition(diskDefinition._fileRef, files);
DatadiskTO datadiskTO = generateDiskTO(fileDefinition, diskDefinition, ovfParentPath, diskNumber, diskItem); DatadiskTO datadiskTO = generateDiskTO(fileDefinition, diskDefinition, ovfParentPath, diskNumber, diskItem);
@ -278,8 +277,8 @@ public class OVFHelper {
if (StringUtils.isNotBlank(path)) { if (StringUtils.isNotBlank(path)) {
File f = new File(path); File f = new File(path);
if (!f.exists() || f.isDirectory()) { if (!f.exists() || f.isDirectory()) {
logger.error("One of the attached disk or ISO does not exists " + path); logger.error("One of the attached disk or ISOs does not exists {}", path);
throw new InternalErrorException("One of the attached disk or ISO as stated on OVF does not exists " + path); throw new InternalErrorException("One of the attached disk or ISOs as stated on OVF does not exists " + path);
} }
} }
Long capacity = disk != null ? disk._capacity : file._size; Long capacity = disk != null ? disk._capacity : file._size;
@ -334,9 +333,7 @@ public class OVFHelper {
od._controller = getControllerType(items, od._diskId); od._controller = getControllerType(items, od._diskId);
vd.add(od); vd.add(od);
} }
if (logger.isTraceEnabled()) { logger.trace("Found {} disk definitions", vd.size());
logger.trace(String.format("Found %d disk definitions", vd.size()));
}
return vd; return vd;
} }
@ -366,9 +363,7 @@ public class OVFHelper {
vf.add(of); vf.add(of);
} }
} }
if (logger.isTraceEnabled()) { logger.trace("Found {} file definitions in {}", vf.size(), ovfFile.getPath());
logger.trace(String.format("Found %d file definitions in %s", vf.size(), ovfFile.getPath()));
}
return vf; return vf;
} }
@ -506,7 +501,7 @@ public class OVFHelper {
outfile.write(writer.toString()); outfile.write(writer.toString());
outfile.close(); outfile.close();
} catch (IOException | TransformerException e) { } catch (IOException | TransformerException e) {
logger.info("Unexpected exception caught while rewriting OVF:" + e.getMessage(), e); logger.info("Unexpected exception caught while rewriting OVF: {}", e.getMessage(), e);
throw new CloudRuntimeException(e); throw new CloudRuntimeException(e);
} }
} }
@ -522,9 +517,7 @@ public class OVFHelper {
public List<OVFNetworkTO> getNetPrerequisitesFromDocument(Document doc) throws InternalErrorException { public List<OVFNetworkTO> getNetPrerequisitesFromDocument(Document doc) throws InternalErrorException {
if (doc == null) { if (doc == null) {
if (logger.isTraceEnabled()) { logger.trace("No document to parse; returning no prerequisite networks");
logger.trace("No document to parse; returning no prerequisite Networks");
}
return Collections.emptyList(); return Collections.emptyList();
} }
@ -540,9 +533,7 @@ public class OVFHelper {
private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement) { private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement) {
final DocumentTraversal traversal = (DocumentTraversal) systemElement; final DocumentTraversal traversal = (DocumentTraversal) systemElement;
final NodeIterator iterator = traversal.createNodeIterator(systemElement, NodeFilter.SHOW_ELEMENT, null, true); final NodeIterator iterator = traversal.createNodeIterator(systemElement, NodeFilter.SHOW_ELEMENT, null, true);
if (logger.isTraceEnabled()) { logger.trace("Starting out with {} network-prerequisites, parsing hardware", nets.size());
logger.trace(String.format("Starting out with %d network-prerequisites, parsing hardware",nets.size()));
}
int nicCount = 0; int nicCount = 0;
for (Node n = iterator.nextNode(); n != null; n = iterator.nextNode()) { for (Node n = iterator.nextNode(); n != null; n = iterator.nextNode()) {
final Element e = (Element) n; final Element e = (Element) n;
@ -550,9 +541,7 @@ public class OVFHelper {
nicCount++; nicCount++;
String name = e.getTextContent(); // should be in our nets String name = e.getTextContent(); // should be in our nets
if(nets.get(name) == null) { if(nets.get(name) == null) {
if(logger.isInfoEnabled()) { logger.info("Found a NIC definition without a Network definition by name {}, adding it to the list.", name);
logger.info(String.format("Found a NIC definition without a Network definition by name %s, adding it to the list.", name));
}
nets.put(name, new OVFNetworkTO()); nets.put(name, new OVFNetworkTO());
} }
OVFNetworkTO thisNet = nets.get(name); OVFNetworkTO thisNet = nets.get(name);
@ -561,9 +550,7 @@ public class OVFHelper {
} }
} }
} }
if (logger.isTraceEnabled()) { logger.trace("Ending up with {} network-prerequisites, parsed {} nics", nets.size(), nicCount);
logger.trace(String.format("Ending up with %d network-prerequisites, parsed %d NICs", nets.size(), nicCount));
}
} }
/** /**
@ -585,7 +572,7 @@ public class OVFHelper {
int addressOnParent = Integer.parseInt(addressOnParentStr); int addressOnParent = Integer.parseInt(addressOnParentStr);
nic.setAddressOnParent(addressOnParent); nic.setAddressOnParent(addressOnParent);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
logger.warn("Encountered element of type \"AddressOnParent\", that could not be parse to an integer number: " + addressOnParentStr); logger.warn("Encountered element of type \"AddressOnParent\", that could not be parse to an integer number: {}", addressOnParentStr);
} }
boolean automaticAllocation = StringUtils.isNotBlank(automaticAllocationStr) && Boolean.parseBoolean(automaticAllocationStr); boolean automaticAllocation = StringUtils.isNotBlank(automaticAllocationStr) && Boolean.parseBoolean(automaticAllocationStr);
@ -597,7 +584,7 @@ public class OVFHelper {
int instanceId = Integer.parseInt(instanceIdStr); int instanceId = Integer.parseInt(instanceIdStr);
nic.setInstanceID(instanceId); nic.setInstanceID(instanceId);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
logger.warn("Encountered element of type \"InstanceID\", that could not be parse to an integer number: " + instanceIdStr); logger.warn("Encountered element of type \"InstanceID\", that could not be parse to an integer number: {}", instanceIdStr);
} }
nic.setResourceSubType(resourceSubType); nic.setResourceSubType(resourceSubType);
@ -630,9 +617,7 @@ public class OVFHelper {
nets.put(networkName,network); nets.put(networkName,network);
} }
if (logger.isTraceEnabled()) { logger.trace("Found {} Networks in Template", nets.size());
logger.trace(String.format("Found %d Networks in Template", nets.size()));
}
return nets; return nets;
} }
@ -771,7 +756,7 @@ public class OVFHelper {
try { try {
return Long.parseLong(value); return Long.parseLong(value);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
logger.debug("Could not parse the value: " + value + ", ignoring it"); logger.debug("Could not parse the value: {}, ignoring it", value);
} }
} }
return null; return null;
@ -782,7 +767,7 @@ public class OVFHelper {
try { try {
return Integer.parseInt(value); return Integer.parseInt(value);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
logger.debug("Could not parse the value: " + value + ", ignoring it"); logger.debug("Could not parse the value: {}, ignoring it", value);
} }
} }
return null; return null;
@ -820,7 +805,7 @@ public class OVFHelper {
try { try {
compressedLicense = compressOVFEula(eulaLicense); compressedLicense = compressOVFEula(eulaLicense);
} catch (IOException e) { } catch (IOException e) {
logger.error("Could not compress the license for info " + eulaInfo); logger.error("Could not compress the license for info {}", eulaInfo);
continue; continue;
} }
OVFEulaSectionTO eula = new OVFEulaSectionTO(eulaInfo, compressedLicense, eulaIndex); OVFEulaSectionTO eula = new OVFEulaSectionTO(eulaInfo, compressedLicense, eulaIndex);

View File

@ -54,7 +54,7 @@ public class OVFParser {
documentBuilderFactory.setNamespaceAware(true); documentBuilderFactory.setNamespaceAware(true);
documentBuilder = documentBuilderFactory.newDocumentBuilder(); documentBuilder = documentBuilderFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) { } catch (ParserConfigurationException e) {
logger.error("Cannot start the OVF parser: " + e.getMessage(), e); logger.error("Cannot start the OVF parser: {}", e.getMessage(), e);
} }
} }
@ -70,7 +70,7 @@ public class OVFParser {
try { try {
return documentBuilder.parse(new File(ovfFilePath)); return documentBuilder.parse(new File(ovfFilePath));
} catch (SAXException | IOException e) { } catch (SAXException | IOException e) {
logger.error("Error parsing " + ovfFilePath + " " + e.getMessage(), e); logger.error("Error parsing {} {}", ovfFilePath, e.getMessage(), e);
return null; return null;
} }
} }

View File

@ -46,7 +46,7 @@ public class DiskTO {
private Long diskSeq; private Long diskSeq;
private String path; private String path;
private Volume.Type type; private Volume.Type type;
private Map<String, String> _details; private Map<String, String> details;
public DiskTO() { public DiskTO() {
@ -92,10 +92,10 @@ public class DiskTO {
} }
public void setDetails(Map<String, String> details) { public void setDetails(Map<String, String> details) {
_details = details; this.details = details;
} }
public Map<String, String> getDetails() { public Map<String, String> getDetails() {
return _details; return details;
} }
} }

View File

@ -47,7 +47,7 @@ public class FirewallRuleTO implements InternalIdentity {
int[] srcPortRange; int[] srcPortRange;
boolean revoked; boolean revoked;
boolean alreadyAdded; boolean alreadyAdded;
private List<String> sourceCidrList; protected List<String> sourceCidrList;
private List<String> destCidrList; private List<String> destCidrList;
FirewallRule.Purpose purpose; FirewallRule.Purpose purpose;
private Integer icmpType; private Integer icmpType;

View File

@ -16,7 +16,9 @@
// under the License. // under the License.
package com.cloud.agent.api.to; package com.cloud.agent.api.to;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import com.cloud.agent.api.VgpuTypesInfo; import com.cloud.agent.api.VgpuTypesInfo;
@ -24,9 +26,23 @@ public class GPUDeviceTO {
private String gpuGroup; private String gpuGroup;
private String vgpuType; private String vgpuType;
private int gpuCount;
private HashMap<String, HashMap<String, VgpuTypesInfo>> groupDetails = new HashMap<String, HashMap<String, VgpuTypesInfo>>(); private HashMap<String, HashMap<String, VgpuTypesInfo>> groupDetails = new HashMap<String, HashMap<String, VgpuTypesInfo>>();
private List<VgpuTypesInfo> gpuDevices = new ArrayList<>();
public GPUDeviceTO( String gpuGroup, String vgpuType, HashMap<String, HashMap<String, VgpuTypesInfo>> groupDetails) { public GPUDeviceTO(String gpuGroup, String vgpuType, int gpuCount,
HashMap<String, HashMap<String, VgpuTypesInfo>> groupDetails,
List<VgpuTypesInfo> gpuDevices) {
this.gpuGroup = gpuGroup;
this.vgpuType = vgpuType;
this.groupDetails = groupDetails;
this.gpuCount = gpuCount;
this.gpuDevices = gpuDevices;
}
public GPUDeviceTO(String gpuGroup, String vgpuType,
HashMap<String, HashMap<String, VgpuTypesInfo>> groupDetails) {
this.gpuGroup = gpuGroup; this.gpuGroup = gpuGroup;
this.vgpuType = vgpuType; this.vgpuType = vgpuType;
this.groupDetails = groupDetails; this.groupDetails = groupDetails;
@ -48,6 +64,14 @@ public class GPUDeviceTO {
this.vgpuType = vgpuType; this.vgpuType = vgpuType;
} }
public int getGpuCount() {
return gpuCount;
}
public void setGpuCount(int gpuCount) {
this.gpuCount = gpuCount;
}
public HashMap<String, HashMap<String, VgpuTypesInfo>> getGroupDetails() { public HashMap<String, HashMap<String, VgpuTypesInfo>> getGroupDetails() {
return groupDetails; return groupDetails;
} }
@ -56,4 +80,11 @@ public class GPUDeviceTO {
this.groupDetails = groupDetails; this.groupDetails = groupDetails;
} }
public List<VgpuTypesInfo> getGpuDevices() {
return gpuDevices;
}
public void setGpuDevices(List<VgpuTypesInfo> gpuDevices) {
this.gpuDevices = gpuDevices;
}
} }

View File

@ -71,7 +71,7 @@ public class LoadBalancerTO {
this.destinations = new DestinationTO[destinations.size()]; this.destinations = new DestinationTO[destinations.size()];
this.stickinessPolicies = null; this.stickinessPolicies = null;
this.sslCert = null; this.sslCert = null;
this.lbProtocol = null; this.lbProtocol = protocol;
int i = 0; int i = 0;
for (LbDestination destination : destinations) { for (LbDestination destination : destinations) {
this.destinations[i++] = new DestinationTO(destination.getIpAddress(), destination.getDestinationPortStart(), destination.isRevoked(), false); this.destinations[i++] = new DestinationTO(destination.getIpAddress(), destination.getDestinationPortStart(), destination.isRevoked(), false);
@ -205,6 +205,10 @@ public class LoadBalancerTO {
return this.sslCert; return this.sslCert;
} }
public void setLbSslCert(LbSslCert sslCert) {
this.sslCert = sslCert;
}
public String getSrcIpVlan() { public String getSrcIpVlan() {
return srcIpVlan; return srcIpVlan;
} }

View File

@ -36,7 +36,7 @@ public class NetworkTO {
protected TrafficType type; protected TrafficType type;
protected URI broadcastUri; protected URI broadcastUri;
protected URI isolationUri; protected URI isolationUri;
protected boolean isSecurityGroupEnabled; protected boolean securityGroupEnabled;
protected String name; protected String name;
protected String ip6address; protected String ip6address;
protected String ip6gateway; protected String ip6gateway;
@ -112,7 +112,7 @@ public class NetworkTO {
} }
public void setSecurityGroupEnabled(boolean enabled) { public void setSecurityGroupEnabled(boolean enabled) {
this.isSecurityGroupEnabled = enabled; this.securityGroupEnabled = enabled;
} }
/** /**
@ -221,7 +221,7 @@ public class NetworkTO {
} }
public boolean isSecurityGroupEnabled() { public boolean isSecurityGroupEnabled() {
return this.isSecurityGroupEnabled; return this.securityGroupEnabled;
} }
public void setIp6Dns1(String ip6Dns1) { public void setIp6Dns1(String ip6Dns1) {

View File

@ -33,6 +33,7 @@ public class NicTO extends NetworkTO {
boolean dpdkEnabled; boolean dpdkEnabled;
Integer mtu; Integer mtu;
Long networkId; Long networkId;
boolean enabled;
String networkSegmentName; String networkSegmentName;
@ -86,6 +87,14 @@ public class NicTO extends NetworkTO {
this.nicUuid = uuid; this.nicUuid = uuid;
} }
public String getNicUuid() {
return nicUuid;
}
public void setNicUuid(String nicUuid) {
this.nicUuid = nicUuid;
}
@Override @Override
public String toString() { public String toString() {
return new StringBuilder("[Nic:").append(type).append("-").append(ip).append("-").append(broadcastUri).append("]").toString(); return new StringBuilder("[Nic:").append(type).append("-").append(ip).append("-").append(broadcastUri).append("]").toString();
@ -146,4 +155,12 @@ public class NicTO extends NetworkTO {
public void setNetworkSegmentName(String networkSegmentName) { public void setNetworkSegmentName(String networkSegmentName) {
this.networkSegmentName = networkSegmentName; this.networkSegmentName = networkSegmentName;
} }
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
} }

View File

@ -21,8 +21,6 @@ import com.cloud.network.rules.PortForwardingRule;
import com.cloud.utils.net.NetUtils; import com.cloud.utils.net.NetUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.util.List;
/** /**
* PortForwardingRuleTO specifies one port forwarding rule. * PortForwardingRuleTO specifies one port forwarding rule.
* *
@ -32,8 +30,6 @@ public class PortForwardingRuleTO extends FirewallRuleTO {
String dstIp; String dstIp;
int[] dstPortRange; int[] dstPortRange;
List<String> sourceCidrList;
protected PortForwardingRuleTO() { protected PortForwardingRuleTO() {
super(); super();
} }

View File

@ -36,13 +36,17 @@ public class RemoteInstanceTO implements Serializable {
private String vcenterPassword; private String vcenterPassword;
private String vcenterHost; private String vcenterHost;
private String datacenterName; private String datacenterName;
private String clusterName;
private String hostName;
public RemoteInstanceTO() { public RemoteInstanceTO() {
} }
public RemoteInstanceTO(String instanceName) { public RemoteInstanceTO(String instanceName, String clusterName, String hostName) {
this.hypervisorType = Hypervisor.HypervisorType.VMware; this.hypervisorType = Hypervisor.HypervisorType.VMware;
this.instanceName = instanceName; this.instanceName = instanceName;
this.clusterName = clusterName;
this.hostName = hostName;
} }
public RemoteInstanceTO(String instanceName, String instancePath, String vcenterHost, String vcenterUsername, String vcenterPassword, String datacenterName) { public RemoteInstanceTO(String instanceName, String instancePath, String vcenterHost, String vcenterUsername, String vcenterPassword, String datacenterName) {
@ -55,6 +59,12 @@ public class RemoteInstanceTO implements Serializable {
this.datacenterName = datacenterName; this.datacenterName = datacenterName;
} }
public RemoteInstanceTO(String instanceName, String instancePath, String vcenterHost, String vcenterUsername, String vcenterPassword, String datacenterName, String clusterName, String hostName) {
this(instanceName, instancePath, vcenterHost, vcenterUsername, vcenterPassword, datacenterName);
this.clusterName = clusterName;
this.hostName = hostName;
}
public Hypervisor.HypervisorType getHypervisorType() { public Hypervisor.HypervisorType getHypervisorType() {
return this.hypervisorType; return this.hypervisorType;
} }
@ -82,4 +92,12 @@ public class RemoteInstanceTO implements Serializable {
public String getDatacenterName() { public String getDatacenterName() {
return datacenterName; return datacenterName;
} }
public String getClusterName() {
return clusterName;
}
public String getHostName() {
return hostName;
}
} }

View File

@ -0,0 +1,182 @@
// 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.
package com.cloud.agent.api.to;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class VirtualMachineMetadataTO {
// VM details
private final String name;
private final String internalName;
private final String displayName;
private final String instanceUuid;
private final Integer cpuCores;
private final Integer memory;
private final Long created;
private final Long started;
// Owner details
private final String ownerDomainUuid;
private final String ownerDomainName;
private final String ownerAccountUuid;
private final String ownerAccountName;
private final String ownerProjectUuid;
private final String ownerProjectName;
// Host and service offering
private final String serviceOfferingName;
private final List<String> serviceOfferingHostTags;
// zone, pod, and cluster details
private final String zoneName;
private final String zoneUuid;
private final String podName;
private final String podUuid;
private final String clusterName;
private final String clusterUuid;
// resource tags
private final Map<String, String> resourceTags;
public VirtualMachineMetadataTO(
String name, String internalName, String displayName, String instanceUuid, Integer cpuCores, Integer memory, Long created, Long started,
String ownerDomainUuid, String ownerDomainName, String ownerAccountUuid, String ownerAccountName, String ownerProjectUuid, String ownerProjectName,
String serviceOfferingName, List<String> serviceOfferingHostTags,
String zoneName, String zoneUuid, String podName, String podUuid, String clusterName, String clusterUuid, Map<String, String> resourceTags) {
/*
* Something failed in the metadata shall not be a fatal error, the VM can still be started
* Thus, the unknown fields just get an explicit "unknown" value so it can be fixed in case
* there are bugs on some execution paths.
* */
this.name = (name != null) ? name : "unknown";
this.internalName = (internalName != null) ? internalName : "unknown";
this.displayName = (displayName != null) ? displayName : "unknown";
this.instanceUuid = (instanceUuid != null) ? instanceUuid : "unknown";
this.cpuCores = (cpuCores != null) ? cpuCores : -1;
this.memory = (memory != null) ? memory : -1;
this.created = (created != null) ? created : 0;
this.started = (started != null) ? started : 0;
this.ownerDomainUuid = (ownerDomainUuid != null) ? ownerDomainUuid : "unknown";
this.ownerDomainName = (ownerDomainName != null) ? ownerDomainName : "unknown";
this.ownerAccountUuid = (ownerAccountUuid != null) ? ownerAccountUuid : "unknown";
this.ownerAccountName = (ownerAccountName != null) ? ownerAccountName : "unknown";
this.ownerProjectUuid = (ownerProjectUuid != null) ? ownerProjectUuid : "unknown";
this.ownerProjectName = (ownerProjectName != null) ? ownerProjectName : "unknown";
this.serviceOfferingName = (serviceOfferingName != null) ? serviceOfferingName : "unknown";
this.serviceOfferingHostTags = (serviceOfferingHostTags != null) ? serviceOfferingHostTags : new ArrayList<>();
this.zoneName = (zoneName != null) ? zoneName : "unknown";
this.zoneUuid = (zoneUuid != null) ? zoneUuid : "unknown";
this.podName = (podName != null) ? podName : "unknown";
this.podUuid = (podUuid != null) ? podUuid : "unknown";
this.clusterName = (clusterName != null) ? clusterName : "unknown";
this.clusterUuid = (clusterUuid != null) ? clusterUuid : "unknown";
this.resourceTags = (resourceTags != null) ? resourceTags : new HashMap<>();
}
public String getName() {
return name;
}
public String getInternalName() {
return internalName;
}
public String getDisplayName() {
return displayName;
}
public String getInstanceUuid() {
return instanceUuid;
}
public Integer getCpuCores() {
return cpuCores;
}
public Integer getMemory() {
return memory;
}
public Long getCreated() { return created; }
public Long getStarted() {
return started;
}
public String getOwnerDomainUuid() {
return ownerDomainUuid;
}
public String getOwnerDomainName() {
return ownerDomainName;
}
public String getOwnerAccountUuid() {
return ownerAccountUuid;
}
public String getOwnerAccountName() {
return ownerAccountName;
}
public String getOwnerProjectUuid() {
return ownerProjectUuid;
}
public String getOwnerProjectName() {
return ownerProjectName;
}
public String getserviceOfferingName() {
return serviceOfferingName;
}
public List<String> getserviceOfferingHostTags() {
return serviceOfferingHostTags;
}
public String getZoneName() {
return zoneName;
}
public String getZoneUuid() {
return zoneUuid;
}
public String getPodName() {
return podName;
}
public String getPodUuid() {
return podUuid;
}
public String getClusterName() {
return clusterName;
}
public String getClusterUuid() {
return clusterUuid;
}
public Map<String, String> getResourceTags() { return resourceTags; }
}

View File

@ -19,20 +19,22 @@ package com.cloud.agent.api.to;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.HashMap; import java.util.HashMap;
import java.util.stream.Collectors;
import com.cloud.agent.api.LogLevel; import com.cloud.agent.api.LogLevel;
import com.cloud.network.element.NetworkElement; import com.cloud.network.element.NetworkElement;
import com.cloud.template.VirtualMachineTemplate.BootloaderType; import com.cloud.template.VirtualMachineTemplate.BootloaderType;
import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachine.Type; import com.cloud.vm.VirtualMachine.Type;
import com.cloud.vm.VmDetailConstants;
public class VirtualMachineTO { public class VirtualMachineTO {
private long id; private long id;
private String name; private String name;
private BootloaderType bootloader; private BootloaderType bootloader;
private VirtualMachine.State state; private VirtualMachine.State state;
Type type; private Type type;
int cpus; private int cpus;
/** /**
'speed' is still here since 4.0.X/4.1.X management servers do not support 'speed' is still here since 4.0.X/4.1.X management servers do not support
@ -43,49 +45,51 @@ public class VirtualMachineTO {
So this is here for backwards compatibility with 4.0.X/4.1.X management servers So this is here for backwards compatibility with 4.0.X/4.1.X management servers
and newer agents. and newer agents.
*/ */
Integer speed; private Integer speed;
Integer minSpeed; private Integer minSpeed;
Integer maxSpeed; private Integer maxSpeed;
long minRam; private long minRam;
long maxRam; private long maxRam;
String hostName; private String hostName;
String arch; private String arch;
String os; private String os;
String platformEmulator; private String platformEmulator;
String bootArgs; private String bootArgs;
String[] bootupScripts; private String[] bootupScripts;
boolean enableHA; private boolean enableHA;
boolean limitCpuUse; private boolean limitCpuUse;
boolean enableDynamicallyScaleVm; private boolean enableDynamicallyScaleVm;
@LogLevel(LogLevel.Log4jLevel.Off) @LogLevel(LogLevel.Log4jLevel.Off)
String vncPassword; private String vncPassword;
String vncAddr; private String vncAddr;
Map<String, String> params; private Map<String, String> details;
String uuid; private Map<String, String> params;
String bootType; private String uuid;
String bootMode; private String bootType;
boolean enterHardwareSetup; private String bootMode;
private boolean enterHardwareSetup;
DiskTO[] disks; private DiskTO[] disks;
NicTO[] nics; private NicTO[] nics;
GPUDeviceTO gpuDevice; private GPUDeviceTO gpuDevice;
Integer vcpuMaxLimit; private Integer vcpuMaxLimit;
List<String[]> vmData = null; private List<String[]> vmData = null;
String configDriveLabel = null; private String configDriveLabel = null;
String configDriveIsoRootFolder = null; private String configDriveIsoRootFolder = null;
String configDriveIsoFile = null; private String configDriveIsoFile = null;
NetworkElement.Location configDriveLocation = NetworkElement.Location.SECONDARY; private NetworkElement.Location configDriveLocation = NetworkElement.Location.SECONDARY;
Double cpuQuotaPercentage = null; private Double cpuQuotaPercentage = null;
Map<String, String> guestOsDetails = new HashMap<String, String>(); private Map<String, String> guestOsDetails = new HashMap<String, String>();
Map<String, String> extraConfig = new HashMap<>(); private Map<String, String> extraConfig = new HashMap<>();
Map<Long, String> networkIdToNetworkNameMap = new HashMap<>(); private Map<Long, String> networkIdToNetworkNameMap = new HashMap<>();
DeployAsIsInfoTO deployAsIsInfo; private DeployAsIsInfoTO deployAsIsInfo;
String metadataManufacturer; private String metadataManufacturer;
String metadataProductName; private String metadataProductName;
private VirtualMachineMetadataTO metadata;
public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader, public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader,
String os, boolean enableHA, boolean limitCpuUse, String vncPassword) { String os, boolean enableHA, boolean limitCpuUse, String vncPassword) {
@ -191,7 +195,11 @@ public class VirtualMachineTO {
return maxSpeed; return maxSpeed;
} }
public boolean getLimitCpuUse() { public boolean isEnableHA() {
return enableHA;
}
public boolean isLimitCpuUse() {
return limitCpuUse; return limitCpuUse;
} }
@ -256,6 +264,10 @@ public class VirtualMachineTO {
this.bootupScripts = bootupScripts; this.bootupScripts = bootupScripts;
} }
public void setEnableHA(boolean enableHA) {
this.enableHA = enableHA;
}
public DiskTO[] getDisks() { public DiskTO[] getDisks() {
return disks; return disks;
} }
@ -289,11 +301,11 @@ public class VirtualMachineTO {
} }
public Map<String, String> getDetails() { public Map<String, String> getDetails() {
return params; return details;
} }
public void setDetails(Map<String, String> params) { public void setDetails(Map<String, String> params) {
this.params = params; this.details = params;
} }
public String getUuid() { public String getUuid() {
@ -431,6 +443,42 @@ public class VirtualMachineTO {
this.deployAsIsInfo = deployAsIsInfo; this.deployAsIsInfo = deployAsIsInfo;
} }
public void setSpeed(Integer speed) {
this.speed = speed;
}
public void setMinSpeed(Integer minSpeed) {
this.minSpeed = minSpeed;
}
public void setMaxSpeed(Integer maxSpeed) {
this.maxSpeed = maxSpeed;
}
public void setMinRam(long minRam) {
this.minRam = minRam;
}
public void setMaxRam(long maxRam) {
this.maxRam = maxRam;
}
public void setLimitCpuUse(boolean limitCpuUse) {
this.limitCpuUse = limitCpuUse;
}
public Map<String, String> getParams() {
return params;
}
public void setParams(Map<String, String> params) {
this.params = params;
}
public void setExtraConfig(Map<String, String> extraConfig) {
this.extraConfig = extraConfig;
}
public String getMetadataManufacturer() { public String getMetadataManufacturer() {
return metadataManufacturer; return metadataManufacturer;
} }
@ -447,8 +495,28 @@ public class VirtualMachineTO {
this.metadataProductName = metadataProductName; this.metadataProductName = metadataProductName;
} }
public VirtualMachineMetadataTO getMetadata() {
return metadata;
}
public void setMetadata(VirtualMachineMetadataTO metadata) {
this.metadata = metadata;
}
@Override @Override
public String toString() { public String toString() {
return String.format("VM {id: \"%s\", name: \"%s\", uuid: \"%s\", type: \"%s\"}", id, name, uuid, type); return String.format("VM {id: \"%s\", name: \"%s\", uuid: \"%s\", type: \"%s\"}", id, name, uuid, type);
} }
public Map<String, String> getExternalDetails() {
if (details == null) {
return new HashMap<>();
}
return details.entrySet().stream()
.filter(entry -> entry.getKey().startsWith(VmDetailConstants.EXTERNAL_DETAIL_PREFIX))
.collect(Collectors.toMap(
entry -> entry.getKey().substring(VmDetailConstants.EXTERNAL_DETAIL_PREFIX.length()),
Map.Entry::getValue
));
}
} }

View File

@ -22,19 +22,11 @@ import com.cloud.deploy.DeploymentPlan;
import com.cloud.deploy.DeploymentPlanner.ExcludeList; import com.cloud.deploy.DeploymentPlanner.ExcludeList;
import com.cloud.host.Host; import com.cloud.host.Host;
import com.cloud.host.Host.Type; import com.cloud.host.Host.Type;
import com.cloud.offering.ServiceOffering;
import com.cloud.utils.component.Adapter; import com.cloud.utils.component.Adapter;
import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.VirtualMachineProfile;
public interface HostAllocator extends Adapter { public interface HostAllocator extends Adapter {
/**
* @param UserVm vm
* @param ServiceOffering offering
**/
boolean isVirtualMachineUpgradable(final VirtualMachine vm, final ServiceOffering offering);
/** /**
* Determines which physical hosts are suitable to * Determines which physical hosts are suitable to
* allocate the guest virtual machines on * allocate the guest virtual machines on
@ -49,31 +41,6 @@ public interface HostAllocator extends Adapter {
public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo); public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo);
/**
* Determines which physical hosts are suitable to allocate the guest
* virtual machines on
*
* Allocators must set any other hosts not considered for allocation in the
* ExcludeList avoid. Thus the avoid set and the list of hosts suitable,
* together must cover the entire host set in the cluster.
*
* @param VirtualMachineProfile
* vmProfile
* @param DeploymentPlan
* plan
* @param GuestType
* type
* @param ExcludeList
* avoid
* @param int returnUpTo (use -1 to return all possible hosts)
* @param boolean considerReservedCapacity (default should be true, set to
* false if host capacity calculation should not look at reserved
* capacity)
* @return List<Host> List of hosts that are suitable for VM allocation
**/
public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo, boolean considerReservedCapacity);
/** /**
* Determines which physical hosts are suitable to allocate the guest * Determines which physical hosts are suitable to allocate the guest
* virtual machines on * virtual machines on

View File

@ -34,13 +34,17 @@ public interface Capacity extends InternalIdentity, Identity {
public static final short CAPACITY_TYPE_LOCAL_STORAGE = 9; public static final short CAPACITY_TYPE_LOCAL_STORAGE = 9;
public static final short CAPACITY_TYPE_VIRTUAL_NETWORK_IPV6_SUBNET = 10; public static final short CAPACITY_TYPE_VIRTUAL_NETWORK_IPV6_SUBNET = 10;
public static final short CAPACITY_TYPE_GPU = 19; public static final short CAPACITY_TYPE_GPU = 19;
public static final short CAPACITY_TYPE_OBJECT_STORAGE = 20;
public static final short CAPACITY_TYPE_BACKUP_STORAGE = 21;
public static final short CAPACITY_TYPE_CPU_CORE = 90; public static final short CAPACITY_TYPE_CPU_CORE = 90;
public static final List<Short> STORAGE_CAPACITY_TYPES = List.of(CAPACITY_TYPE_STORAGE, public static final List<Short> STORAGE_CAPACITY_TYPES = List.of(CAPACITY_TYPE_STORAGE,
CAPACITY_TYPE_STORAGE_ALLOCATED, CAPACITY_TYPE_STORAGE_ALLOCATED,
CAPACITY_TYPE_SECONDARY_STORAGE, CAPACITY_TYPE_SECONDARY_STORAGE,
CAPACITY_TYPE_LOCAL_STORAGE); CAPACITY_TYPE_LOCAL_STORAGE,
CAPACITY_TYPE_BACKUP_STORAGE,
CAPACITY_TYPE_OBJECT_STORAGE);
public Long getHostOrPoolId(); public Long getHostOrPoolId();

View File

@ -17,18 +17,25 @@
package com.cloud.configuration; package com.cloud.configuration;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Objects;
import com.cloud.network.Network;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.command.admin.config.ResetCfgCmd; import org.apache.cloudstack.api.command.admin.config.ResetCfgCmd;
import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd; import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd;
import org.apache.cloudstack.api.command.admin.network.CloneNetworkOfferingCmd;
import org.apache.cloudstack.api.command.admin.network.CreateGuestNetworkIpv6PrefixCmd; import org.apache.cloudstack.api.command.admin.network.CreateGuestNetworkIpv6PrefixCmd;
import org.apache.cloudstack.api.command.admin.network.CreateManagementNetworkIpRangeCmd; import org.apache.cloudstack.api.command.admin.network.CreateManagementNetworkIpRangeCmd;
import org.apache.cloudstack.api.command.admin.network.CreateNetworkOfferingCmd;
import org.apache.cloudstack.api.command.admin.network.DeleteGuestNetworkIpv6PrefixCmd; import org.apache.cloudstack.api.command.admin.network.DeleteGuestNetworkIpv6PrefixCmd;
import org.apache.cloudstack.api.command.admin.network.DeleteManagementNetworkIpRangeCmd; import org.apache.cloudstack.api.command.admin.network.DeleteManagementNetworkIpRangeCmd;
import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd; import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd;
import org.apache.cloudstack.api.command.admin.network.ListGuestNetworkIpv6PrefixesCmd; import org.apache.cloudstack.api.command.admin.network.ListGuestNetworkIpv6PrefixesCmd;
import org.apache.cloudstack.api.command.admin.network.NetworkOfferingBaseCmd;
import org.apache.cloudstack.api.command.admin.network.UpdateNetworkOfferingCmd; import org.apache.cloudstack.api.command.admin.network.UpdateNetworkOfferingCmd;
import org.apache.cloudstack.api.command.admin.network.UpdatePodManagementNetworkIpRangeCmd; import org.apache.cloudstack.api.command.admin.network.UpdatePodManagementNetworkIpRangeCmd;
import org.apache.cloudstack.api.command.admin.offering.CloneDiskOfferingCmd;
import org.apache.cloudstack.api.command.admin.offering.CloneServiceOfferingCmd;
import org.apache.cloudstack.api.command.admin.offering.CreateDiskOfferingCmd; import org.apache.cloudstack.api.command.admin.offering.CreateDiskOfferingCmd;
import org.apache.cloudstack.api.command.admin.offering.CreateServiceOfferingCmd; import org.apache.cloudstack.api.command.admin.offering.CreateServiceOfferingCmd;
import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd; import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd;
@ -101,39 +108,52 @@ public interface ConfigurationService {
*/ */
ServiceOffering createServiceOffering(CreateServiceOfferingCmd cmd); ServiceOffering createServiceOffering(CreateServiceOfferingCmd cmd);
/**
* Clones a service offering with optional parameter overrides
*
* @param cmd
* the command object that specifies the source offering ID and optional parameter overrides
* @return the newly created service offering cloned from source, null otherwise
*/
ServiceOffering cloneServiceOffering(CloneServiceOfferingCmd cmd);
/**
* Clones a disk offering with optional parameter overrides
*
* @param cmd
* the command object that specifies the source offering ID and optional parameter overrides
* @return the newly created disk offering cloned from source, null otherwise
*/
DiskOffering cloneDiskOffering(CloneDiskOfferingCmd cmd);
/**
* Clones a network offering with optional parameter overrides
*
* @param cmd
* the command object that specifies the source offering ID and optional parameter overrides
* @return the newly created network offering cloned from source, null otherwise
*/
NetworkOffering cloneNetworkOffering(CloneNetworkOfferingCmd cmd);
/** /**
* Updates a service offering * Updates a service offering
* *
* @param serviceOfferingId
* @param userId
* @param name
* @param displayText
* @param offerHA
* @param useVirtualNetwork
* @param tags
* @return updated service offering * @return updated service offering
*/ */
ServiceOffering updateServiceOffering(UpdateServiceOfferingCmd cmd); ServiceOffering updateServiceOffering(UpdateServiceOfferingCmd cmd);
/** /**
* Deletes a service offering * Deletes a service offering
*
* @param userId
* @param serviceOfferingId
*/ */
boolean deleteServiceOffering(DeleteServiceOfferingCmd cmd); boolean deleteServiceOffering(DeleteServiceOfferingCmd cmd);
/** /**
* Retrieve ID of domains for a service offering * Retrieve ID of domains for a service offering
*
* @param serviceOfferingId
*/ */
List<Long> getServiceOfferingDomains(Long serviceOfferingId); List<Long> getServiceOfferingDomains(Long serviceOfferingId);
/** /**
* Retrieve ID of domains for a service offering * Retrieve ID of domains for a service offering
*
* @param serviceOfferingId
*/ */
List<Long> getServiceOfferingZones(Long serviceOfferingId); List<Long> getServiceOfferingZones(Long serviceOfferingId);
@ -143,7 +163,6 @@ public interface ConfigurationService {
* @param cmd * @param cmd
* - the command specifying diskOfferingId, name, description, tags * - the command specifying diskOfferingId, name, description, tags
* @return updated disk offering * @return updated disk offering
* @throws
*/ */
DiskOffering updateDiskOffering(UpdateDiskOfferingCmd cmd); DiskOffering updateDiskOffering(UpdateDiskOfferingCmd cmd);
@ -153,34 +172,22 @@ public interface ConfigurationService {
* @param cmd * @param cmd
* - the command specifying disk offering id * - the command specifying disk offering id
* @return true or false * @return true or false
* @throws
*/ */
boolean deleteDiskOffering(DeleteDiskOfferingCmd cmd); boolean deleteDiskOffering(DeleteDiskOfferingCmd cmd);
/** /**
* Creates a new disk offering * Creates a new disk offering
*
* @param domainId
* @param name
* @param description
* @param numGibibytes
* @param mirrored
* @param size
* @return ID * @return ID
*/ */
DiskOffering createDiskOffering(CreateDiskOfferingCmd cmd); DiskOffering createDiskOffering(CreateDiskOfferingCmd cmd);
/** /**
* Retrieve ID of domains for a disk offering * Retrieve ID of domains for a disk offering
*
* @param diskOfferingId
*/ */
List<Long> getDiskOfferingDomains(Long diskOfferingId); List<Long> getDiskOfferingDomains(Long diskOfferingId);
/** /**
* Retrieve ID of domains for a disk offering * Retrieve ID of domains for a disk offering
*
* @param diskOfferingId
*/ */
List<Long> getDiskOfferingZones(Long diskOfferingId); List<Long> getDiskOfferingZones(Long diskOfferingId);
@ -201,11 +208,10 @@ public interface ConfigurationService {
* TODO * TODO
* @param allocationState * @param allocationState
* TODO * TODO
* @param storageAccessGroups
* @return the new pod if successful, null otherwise * @return the new pod if successful, null otherwise
* @throws
* @throws
*/ */
Pod createPod(long zoneId, String name, String startIp, String endIp, String gateway, String netmask, String allocationState); Pod createPod(long zoneId, String name, String startIp, String endIp, String gateway, String netmask, String allocationState, List<String> storageAccessGroups);
/** /**
* Creates a mutual exclusive IP range in the pod with same gateway, netmask. * Creates a mutual exclusive IP range in the pod with same gateway, netmask.
@ -223,8 +229,7 @@ public interface ConfigurationService {
/** /**
* Updates a mutually exclusive IP range in the pod. * Updates a mutually exclusive IP range in the pod.
* @param cmd - The command specifying pod ID, current Start IP, current End IP, new Start IP, new End IP. * @param cmd - The command specifying pod ID, current Start IP, current End IP, new Start IP, new End IP.
* @throws com.cloud.exception.ConcurrentOperationException * @throws com.cloud.exception.ConcurrentOperationException when this pod is already being accessed
* @return Success
*/ */
void updatePodIpRange(UpdatePodManagementNetworkIpRangeCmd cmd) throws ConcurrentOperationException; void updatePodIpRange(UpdatePodManagementNetworkIpRangeCmd cmd) throws ConcurrentOperationException;
@ -245,9 +250,6 @@ public interface ConfigurationService {
/** /**
* Edits a pod in the database. Will not allow you to edit pods that are being used anywhere in the system. * Edits a pod in the database. Will not allow you to edit pods that are being used anywhere in the system.
*
* @param UpdatePodCmd
* api command
*/ */
Pod editPod(UpdatePodCmd cmd); Pod editPod(UpdatePodCmd cmd);
@ -257,17 +259,12 @@ public interface ConfigurationService {
* @param cmd * @param cmd
* - the command containing podId * - the command containing podId
* @return true or false * @return true or false
* @throws ,
*/ */
boolean deletePod(DeletePodCmd cmd); boolean deletePod(DeletePodCmd cmd);
/** /**
* Creates a new zone * Creates a new zone
*
* @param cmd
* @return the zone if successful, null otherwise * @return the zone if successful, null otherwise
* @throws
* @throws
*/ */
DataCenter createZone(CreateZoneCmd cmd); DataCenter createZone(CreateZoneCmd cmd);
@ -290,22 +287,7 @@ public interface ConfigurationService {
* Adds a VLAN to the database, along with an IP address range. Can add three types of VLANs: (1) zone-wide VLANs on * Adds a VLAN to the database, along with an IP address range. Can add three types of VLANs: (1) zone-wide VLANs on
* the * the
* virtual public network (2) pod-wide direct attached VLANs (3) account-specific direct attached VLANs * virtual public network (2) pod-wide direct attached VLANs (3) account-specific direct attached VLANs
*
* @param userId
* @param vlanType
* - either "DomR" (VLAN for a virtual public network) or "DirectAttached" (VLAN for IPs that will be
* directly
* attached to UserVMs)
* @param zoneId
* @param accountId
* @param podId
* @param add
* @param vlanId
* @param gateway
* @param startIP
* @param endIP
* @throws ResourceAllocationException TODO * @throws ResourceAllocationException TODO
* @throws
* @return The new Vlan object * @return The new Vlan object
*/ */
Vlan createVlanAndPublicIpRange(CreateVlanIpRangeCmd cmd) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, Vlan createVlanAndPublicIpRange(CreateVlanIpRangeCmd cmd) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException,
@ -320,9 +302,6 @@ public interface ConfigurationService {
/** /**
* Marks the account with the default zone-id. * Marks the account with the default zone-id.
* *
* @param accountName
* @param domainId
* @param defaultZoneId
* @return The new account object * @return The new account object
*/ */
Account markDefaultZone(String accountName, long domainId, long defaultZoneId); Account markDefaultZone(String accountName, long domainId, long defaultZoneId);
@ -333,7 +312,7 @@ public interface ConfigurationService {
boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd); boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd);
NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd); NetworkOffering createNetworkOffering(NetworkOfferingBaseCmd cmd);
NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd); NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd);
@ -344,14 +323,12 @@ public interface ConfigurationService {
/** /**
* Retrieve ID of domains for a network offering * Retrieve ID of domains for a network offering
* *
* @param networkOfferingId
*/ */
List<Long> getNetworkOfferingDomains(Long networkOfferingId); List<Long> getNetworkOfferingDomains(Long networkOfferingId);
/** /**
* Retrieve ID of domains for a network offering * Retrieve ID of domains for a network offering
* *
* @param networkOfferingId
*/ */
List<Long> getNetworkOfferingZones(Long networkOfferingId); List<Long> getNetworkOfferingZones(Long networkOfferingId);
@ -372,4 +349,16 @@ public interface ConfigurationService {
List<? extends PortableIp> listPortableIps(long id); List<? extends PortableIp> listPortableIps(long id);
Boolean isAccountAllowedToCreateOfferingsWithTags(IsAccountAllowedToCreateOfferingsWithTagsCmd cmd); Boolean isAccountAllowedToCreateOfferingsWithTags(IsAccountAllowedToCreateOfferingsWithTagsCmd cmd);
public static final Map<String, String> ProviderDetailKeyMap = Map.of(
Network.Provider.Nsx.getName(), ApiConstants.NSX_DETAIL_KEY,
Network.Provider.Netris.getName(), ApiConstants.NETRIS_DETAIL_KEY
);
public static boolean IsIpRangeForProvider(Network.Provider provider) {
if (Objects.isNull(provider)) {
return false;
}
return ProviderDetailKeyMap.containsKey(provider.getName());
}
} }

View File

@ -21,7 +21,7 @@ public interface Resource {
short RESOURCE_UNLIMITED = -1; short RESOURCE_UNLIMITED = -1;
String UNLIMITED = "Unlimited"; String UNLIMITED = "Unlimited";
enum ResourceType { // Primary and Secondary storage are allocated_storage and not the physical storage. enum ResourceType { // All storage type resources are allocated_storage and not the physical storage.
user_vm("user_vm", 0), user_vm("user_vm", 0),
public_ip("public_ip", 1), public_ip("public_ip", 1),
volume("volume", 2), volume("volume", 2),
@ -33,7 +33,12 @@ public interface Resource {
cpu("cpu", 8), cpu("cpu", 8),
memory("memory", 9), memory("memory", 9),
primary_storage("primary_storage", 10), primary_storage("primary_storage", 10),
secondary_storage("secondary_storage", 11); secondary_storage("secondary_storage", 11),
backup("backup", 12),
backup_storage("backup_storage", 13),
bucket("bucket", 14),
object_storage("object_storage", 15),
gpu("gpu", 16);
private String name; private String name;
private int ordinal; private int ordinal;
@ -62,6 +67,10 @@ public interface Resource {
} }
return null; return null;
} }
public static Boolean isStorageType(ResourceType type) {
return (type == primary_storage || type == secondary_storage || type == backup_storage || type == object_storage);
}
} }
public static class ResourceOwnerType { public static class ResourceOwnerType {

View File

@ -22,7 +22,8 @@ public class CPU {
public enum CPUArch { public enum CPUArch {
x86("i686", 32), x86("i686", 32),
amd64("x86_64", 64), amd64("x86_64", 64),
arm64("aarch64", 64); arm64("aarch64", 64),
s390x("s390x", 64);
private final String type; private final String type;
private final int bits; private final int bits;

View File

@ -43,4 +43,6 @@ public interface Pod extends InfrastructureEntity, Grouping, Identity, InternalI
AllocationState getAllocationState(); AllocationState getAllocationState();
boolean getExternalDhcp(); boolean getExternalDhcp();
String getStorageAccessGroups();
} }

View File

@ -62,11 +62,11 @@ public interface DeploymentClusterPlanner extends DeploymentPlanner {
"vm.allocation.algorithm", "vm.allocation.algorithm",
"Advanced", "Advanced",
"random", "random",
"Order in which hosts within a cluster will be considered for VM/volume allocation. The value can be 'random', 'firstfit', 'userdispersing', 'userconcentratedpod_random', 'userconcentratedpod_firstfit', or 'firstfitleastconsumed'.", "Order in which hosts within a cluster will be considered for VM allocation. The value can be 'random', 'firstfit', 'userdispersing', or 'firstfitleastconsumed'.",
true, true,
ConfigKey.Scope.Global, null, null, null, null, null, ConfigKey.Scope.Global, null, null, null, null, null,
ConfigKey.Kind.Select, ConfigKey.Kind.Select,
"random,firstfit,userdispersing,userconcentratedpod_random,userconcentratedpod_firstfit,firstfitleastconsumed"); "random,firstfit,userdispersing,firstfitleastconsumed");
/** /**
* This is called to determine list of possible clusters where a virtual * This is called to determine list of possible clusters where a virtual

View File

@ -70,7 +70,7 @@ public interface DeploymentPlanner extends Adapter {
boolean canHandle(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid); boolean canHandle(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid);
public enum AllocationAlgorithm { public enum AllocationAlgorithm {
random, firstfit, userdispersing, userconcentratedpod_random, userconcentratedpod_firstfit; random, firstfit, userdispersing, firstfitleastconsumed;
} }
public enum PlannerResourceUsage { public enum PlannerResourceUsage {

View File

@ -27,15 +27,21 @@ import org.apache.cloudstack.api.response.ClusterResponse;
import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.HostResponse;
import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.PodResponse;
import org.apache.cloudstack.api.response.ZoneResponse; import org.apache.cloudstack.api.response.ZoneResponse;
import org.apache.cloudstack.backup.BackupRepositoryService;
import org.apache.cloudstack.config.Configuration; import org.apache.cloudstack.config.Configuration;
import org.apache.cloudstack.datacenter.DataCenterIpv4GuestSubnet; import org.apache.cloudstack.datacenter.DataCenterIpv4GuestSubnet;
import org.apache.cloudstack.extension.Extension;
import org.apache.cloudstack.extension.ExtensionCustomAction;
import org.apache.cloudstack.gpu.GpuCard;
import org.apache.cloudstack.gpu.GpuDevice;
import org.apache.cloudstack.gpu.VgpuProfile;
import org.apache.cloudstack.ha.HAConfig; import org.apache.cloudstack.ha.HAConfig;
import org.apache.cloudstack.network.BgpPeer; import org.apache.cloudstack.network.BgpPeer;
import org.apache.cloudstack.network.Ipv4GuestSubnetNetworkMap; import org.apache.cloudstack.network.Ipv4GuestSubnetNetworkMap;
import org.apache.cloudstack.quota.QuotaTariff; import org.apache.cloudstack.quota.QuotaTariff;
import org.apache.cloudstack.storage.sharedfs.SharedFS;
import org.apache.cloudstack.storage.object.Bucket; import org.apache.cloudstack.storage.object.Bucket;
import org.apache.cloudstack.storage.object.ObjectStore; import org.apache.cloudstack.storage.object.ObjectStore;
import org.apache.cloudstack.storage.sharedfs.SharedFS;
import org.apache.cloudstack.usage.Usage; import org.apache.cloudstack.usage.Usage;
import org.apache.cloudstack.vm.schedule.VMSchedule; import org.apache.cloudstack.vm.schedule.VMSchedule;
@ -289,9 +295,12 @@ public class EventTypes {
//registering userdata events //registering userdata events
public static final String EVENT_REGISTER_USER_DATA = "REGISTER.USER.DATA"; public static final String EVENT_REGISTER_USER_DATA = "REGISTER.USER.DATA";
public static final String EVENT_REGISTER_CNI_CONFIG = "REGISTER.CNI.CONFIG";
public static final String EVENT_DELETE_CNI_CONFIG = "DELETE.CNI.CONFIG";
//register for user API and secret keys //user API and secret keys
public static final String EVENT_REGISTER_FOR_SECRET_API_KEY = "REGISTER.USER.KEY"; public static final String EVENT_REGISTER_FOR_SECRET_API_KEY = "REGISTER.USER.KEY";
public static final String EVENT_DELETE_SECRET_API_KEY = "DELETE.USER.KEY";
public static final String API_KEY_ACCESS_UPDATE = "API.KEY.ACCESS.UPDATE"; public static final String API_KEY_ACCESS_UPDATE = "API.KEY.ACCESS.UPDATE";
// Template Events // Template Events
@ -366,16 +375,34 @@ public class EventTypes {
// Service Offerings // Service Offerings
public static final String EVENT_SERVICE_OFFERING_CREATE = "SERVICE.OFFERING.CREATE"; public static final String EVENT_SERVICE_OFFERING_CREATE = "SERVICE.OFFERING.CREATE";
public static final String EVENT_SERVICE_OFFERING_CLONE = "SERVICE.OFFERING.CLONE";
public static final String EVENT_SERVICE_OFFERING_EDIT = "SERVICE.OFFERING.EDIT"; public static final String EVENT_SERVICE_OFFERING_EDIT = "SERVICE.OFFERING.EDIT";
public static final String EVENT_SERVICE_OFFERING_DELETE = "SERVICE.OFFERING.DELETE"; public static final String EVENT_SERVICE_OFFERING_DELETE = "SERVICE.OFFERING.DELETE";
// Disk Offerings // Disk Offerings
public static final String EVENT_DISK_OFFERING_CREATE = "DISK.OFFERING.CREATE"; public static final String EVENT_DISK_OFFERING_CREATE = "DISK.OFFERING.CREATE";
public static final String EVENT_DISK_OFFERING_CLONE = "DISK.OFFERING.CLONE";
public static final String EVENT_DISK_OFFERING_EDIT = "DISK.OFFERING.EDIT"; public static final String EVENT_DISK_OFFERING_EDIT = "DISK.OFFERING.EDIT";
public static final String EVENT_DISK_OFFERING_DELETE = "DISK.OFFERING.DELETE"; public static final String EVENT_DISK_OFFERING_DELETE = "DISK.OFFERING.DELETE";
// GPU Cards
public static final String EVENT_GPU_CARD_CREATE = "GPU.CARD.CREATE";
public static final String EVENT_GPU_CARD_EDIT = "GPU.CARD.EDIT";
public static final String EVENT_GPU_CARD_DELETE = "GPU.CARD.DELETE";
// vGPU Profile
public static final String EVENT_VGPU_PROFILE_CREATE = "VGPU.PROFILE.CREATE";
public static final String EVENT_VGPU_PROFILE_EDIT = "VGPU.PROFILE.EDIT";
public static final String EVENT_VGPU_PROFILE_DELETE = "VGPU.PROFILE.DELETE";
// GPU Devices
public static final String EVENT_GPU_DEVICE_CREATE = "GPU.DEVICE.CREATE";
public static final String EVENT_GPU_DEVICE_EDIT = "GPU.DEVICE.EDIT";
public static final String EVENT_GPU_DEVICE_DELETE = "GPU.DEVICE.DELETE";
// Network offerings // Network offerings
public static final String EVENT_NETWORK_OFFERING_CREATE = "NETWORK.OFFERING.CREATE"; public static final String EVENT_NETWORK_OFFERING_CREATE = "NETWORK.OFFERING.CREATE";
public static final String EVENT_NETWORK_OFFERING_CLONE = "NETWORK.OFFERING.CLONE";
public static final String EVENT_NETWORK_OFFERING_ASSIGN = "NETWORK.OFFERING.ASSIGN"; public static final String EVENT_NETWORK_OFFERING_ASSIGN = "NETWORK.OFFERING.ASSIGN";
public static final String EVENT_NETWORK_OFFERING_EDIT = "NETWORK.OFFERING.EDIT"; public static final String EVENT_NETWORK_OFFERING_EDIT = "NETWORK.OFFERING.EDIT";
public static final String EVENT_NETWORK_OFFERING_REMOVE = "NETWORK.OFFERING.REMOVE"; public static final String EVENT_NETWORK_OFFERING_REMOVE = "NETWORK.OFFERING.REMOVE";
@ -465,6 +492,7 @@ public class EventTypes {
public static final String EVENT_ENABLE_PRIMARY_STORAGE = "ENABLE.PS"; public static final String EVENT_ENABLE_PRIMARY_STORAGE = "ENABLE.PS";
public static final String EVENT_DISABLE_PRIMARY_STORAGE = "DISABLE.PS"; public static final String EVENT_DISABLE_PRIMARY_STORAGE = "DISABLE.PS";
public static final String EVENT_SYNC_STORAGE_POOL = "SYNC.STORAGE.POOL"; public static final String EVENT_SYNC_STORAGE_POOL = "SYNC.STORAGE.POOL";
public static final String EVENT_CONFIGURE_STORAGE_ACCESS = "CONFIGURE.STORAGE.ACCESS";
public static final String EVENT_CHANGE_STORAGE_POOL_SCOPE = "CHANGE.STORAGE.POOL.SCOPE"; public static final String EVENT_CHANGE_STORAGE_POOL_SCOPE = "CHANGE.STORAGE.POOL.SCOPE";
// VPN // VPN
@ -479,6 +507,7 @@ public class EventTypes {
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE = "VPN.S2S.CUSTOMER.GATEWAY.CREATE"; public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE = "VPN.S2S.CUSTOMER.GATEWAY.CREATE";
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE = "VPN.S2S.CUSTOMER.GATEWAY.DELETE"; public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE = "VPN.S2S.CUSTOMER.GATEWAY.DELETE";
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE = "VPN.S2S.CUSTOMER.GATEWAY.UPDATE"; public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE = "VPN.S2S.CUSTOMER.GATEWAY.UPDATE";
public static final String EVENT_S2S_VPN_GATEWAY_OBSOLETE_PARAMS = "VPN.S2S.GATEWAY.OBSOLETE.PARAMS";
public static final String EVENT_S2S_VPN_CONNECTION_CREATE = "VPN.S2S.CONNECTION.CREATE"; public static final String EVENT_S2S_VPN_CONNECTION_CREATE = "VPN.S2S.CONNECTION.CREATE";
public static final String EVENT_S2S_VPN_CONNECTION_DELETE = "VPN.S2S.CONNECTION.DELETE"; public static final String EVENT_S2S_VPN_CONNECTION_DELETE = "VPN.S2S.CONNECTION.DELETE";
public static final String EVENT_S2S_VPN_CONNECTION_RESET = "VPN.S2S.CONNECTION.RESET"; public static final String EVENT_S2S_VPN_CONNECTION_RESET = "VPN.S2S.CONNECTION.RESET";
@ -496,6 +525,8 @@ public class EventTypes {
public static final String EVENT_ZONE_VLAN_ASSIGN = "ZONE.VLAN.ASSIGN"; public static final String EVENT_ZONE_VLAN_ASSIGN = "ZONE.VLAN.ASSIGN";
public static final String EVENT_ZONE_VLAN_RELEASE = "ZONE.VLAN.RELEASE"; public static final String EVENT_ZONE_VLAN_RELEASE = "ZONE.VLAN.RELEASE";
public static final String EVENT_ZONE_VXLAN_ASSIGN = "ZONE.VXLAN.ASSIGN";
public static final String EVENT_ZONE_VXLAN_RELEASE = "ZONE.VXLAN.RELEASE";
// Projects // Projects
public static final String EVENT_PROJECT_CREATE = "PROJECT.CREATE"; public static final String EVENT_PROJECT_CREATE = "PROJECT.CREATE";
@ -556,6 +587,7 @@ public class EventTypes {
// Network ACL // Network ACL
public static final String EVENT_NETWORK_ACL_CREATE = "NETWORK.ACL.CREATE"; public static final String EVENT_NETWORK_ACL_CREATE = "NETWORK.ACL.CREATE";
public static final String EVENT_NETWORK_ACL_IMPORT = "NETWORK.ACL.IMPORT";
public static final String EVENT_NETWORK_ACL_DELETE = "NETWORK.ACL.DELETE"; public static final String EVENT_NETWORK_ACL_DELETE = "NETWORK.ACL.DELETE";
public static final String EVENT_NETWORK_ACL_REPLACE = "NETWORK.ACL.REPLACE"; public static final String EVENT_NETWORK_ACL_REPLACE = "NETWORK.ACL.REPLACE";
public static final String EVENT_NETWORK_ACL_UPDATE = "NETWORK.ACL.UPDATE"; public static final String EVENT_NETWORK_ACL_UPDATE = "NETWORK.ACL.UPDATE";
@ -570,6 +602,7 @@ public class EventTypes {
// VPC offerings // VPC offerings
public static final String EVENT_VPC_OFFERING_CREATE = "VPC.OFFERING.CREATE"; public static final String EVENT_VPC_OFFERING_CREATE = "VPC.OFFERING.CREATE";
public static final String EVENT_VPC_OFFERING_CLONE = "VPC.OFFERING.CLONE";
public static final String EVENT_VPC_OFFERING_UPDATE = "VPC.OFFERING.UPDATE"; public static final String EVENT_VPC_OFFERING_UPDATE = "VPC.OFFERING.UPDATE";
public static final String EVENT_VPC_OFFERING_DELETE = "VPC.OFFERING.DELETE"; public static final String EVENT_VPC_OFFERING_DELETE = "VPC.OFFERING.DELETE";
@ -602,16 +635,19 @@ public class EventTypes {
// Backup and Recovery events // Backup and Recovery events
public static final String EVENT_VM_BACKUP_IMPORT_OFFERING = "BACKUP.IMPORT.OFFERING"; public static final String EVENT_VM_BACKUP_IMPORT_OFFERING = "BACKUP.IMPORT.OFFERING";
public static final String EVENT_VM_BACKUP_OFFERING_CLONE = "BACKUP.OFFERING.CLONE";
public static final String EVENT_VM_BACKUP_OFFERING_ASSIGN = "BACKUP.OFFERING.ASSIGN"; public static final String EVENT_VM_BACKUP_OFFERING_ASSIGN = "BACKUP.OFFERING.ASSIGN";
public static final String EVENT_VM_BACKUP_OFFERING_REMOVE = "BACKUP.OFFERING.REMOVE"; public static final String EVENT_VM_BACKUP_OFFERING_REMOVE = "BACKUP.OFFERING.REMOVE";
public static final String EVENT_VM_BACKUP_CREATE = "BACKUP.CREATE"; public static final String EVENT_VM_BACKUP_CREATE = "BACKUP.CREATE";
public static final String EVENT_VM_BACKUP_RESTORE = "BACKUP.RESTORE"; public static final String EVENT_VM_BACKUP_RESTORE = "BACKUP.RESTORE";
public static final String EVENT_VM_BACKUP_DELETE = "BACKUP.DELETE"; public static final String EVENT_VM_BACKUP_DELETE = "BACKUP.DELETE";
public static final String EVENT_VM_BACKUP_OFFERING_REMOVED_AND_BACKUPS_DELETED = "BACKUP.OFFERING.BACKUPS.DEL";
public static final String EVENT_VM_BACKUP_RESTORE_VOLUME_TO_VM = "BACKUP.RESTORE.VOLUME.TO.VM"; public static final String EVENT_VM_BACKUP_RESTORE_VOLUME_TO_VM = "BACKUP.RESTORE.VOLUME.TO.VM";
public static final String EVENT_VM_BACKUP_SCHEDULE_CONFIGURE = "BACKUP.SCHEDULE.CONFIGURE"; public static final String EVENT_VM_BACKUP_SCHEDULE_CONFIGURE = "BACKUP.SCHEDULE.CONFIGURE";
public static final String EVENT_VM_BACKUP_SCHEDULE_DELETE = "BACKUP.SCHEDULE.DELETE"; public static final String EVENT_VM_BACKUP_SCHEDULE_DELETE = "BACKUP.SCHEDULE.DELETE";
public static final String EVENT_VM_BACKUP_USAGE_METRIC = "BACKUP.USAGE.METRIC"; public static final String EVENT_VM_BACKUP_USAGE_METRIC = "BACKUP.USAGE.METRIC";
public static final String EVENT_VM_BACKUP_EDIT = "BACKUP.OFFERING.EDIT"; public static final String EVENT_VM_BACKUP_EDIT = "BACKUP.OFFERING.EDIT";
public static final String EVENT_VM_CREATE_FROM_BACKUP = "VM.CREATE.FROM.BACKUP";
// external network device events // external network device events
public static final String EVENT_EXTERNAL_NVP_CONTROLLER_ADD = "PHYSICAL.NVPCONTROLLER.ADD"; public static final String EVENT_EXTERNAL_NVP_CONTROLLER_ADD = "PHYSICAL.NVPCONTROLLER.ADD";
@ -687,6 +723,9 @@ public class EventTypes {
public static final String EVENT_EXTERNAL_OPENDAYLIGHT_CONFIGURE_CONTROLLER = "PHYSICAL.ODLCONTROLLER.CONFIGURE"; public static final String EVENT_EXTERNAL_OPENDAYLIGHT_CONFIGURE_CONTROLLER = "PHYSICAL.ODLCONTROLLER.CONFIGURE";
//Guest OS related events //Guest OS related events
public static final String EVENT_GUEST_OS_CATEGORY_ADD = "GUEST.OS.CATEGORY.ADD";
public static final String EVENT_GUEST_OS_CATEGORY_DELETE = "GUEST.OS.CATEGORY.DELETE";
public static final String EVENT_GUEST_OS_CATEGORY_UPDATE = "GUEST.OS.CATEGORY.UPDATE";
public static final String EVENT_GUEST_OS_ADD = "GUEST.OS.ADD"; public static final String EVENT_GUEST_OS_ADD = "GUEST.OS.ADD";
public static final String EVENT_GUEST_OS_REMOVE = "GUEST.OS.REMOVE"; public static final String EVENT_GUEST_OS_REMOVE = "GUEST.OS.REMOVE";
public static final String EVENT_GUEST_OS_UPDATE = "GUEST.OS.UPDATE"; public static final String EVENT_GUEST_OS_UPDATE = "GUEST.OS.UPDATE";
@ -739,6 +778,13 @@ public class EventTypes {
//Purge resources //Purge resources
public static final String EVENT_PURGE_EXPUNGED_RESOURCES = "PURGE.EXPUNGED.RESOURCES"; public static final String EVENT_PURGE_EXPUNGED_RESOURCES = "PURGE.EXPUNGED.RESOURCES";
// Management Server
public static final String EVENT_MS_MAINTENANCE_PREPARE = "MS.MAINTENANCE.PREPARE";
public static final String EVENT_MS_MAINTENANCE_CANCEL = "MS.MAINTENANCE.CANCEL";
public static final String EVENT_MS_SHUTDOWN_PREPARE = "MS.SHUTDOWN.PREPARE";
public static final String EVENT_MS_SHUTDOWN_CANCEL = "MS.SHUTDOWN.CANCEL";
public static final String EVENT_MS_SHUTDOWN = "MS.SHUTDOWN";
// OBJECT STORE // OBJECT STORE
public static final String EVENT_OBJECT_STORE_CREATE = "OBJECT.STORE.CREATE"; public static final String EVENT_OBJECT_STORE_CREATE = "OBJECT.STORE.CREATE";
public static final String EVENT_OBJECT_STORE_DELETE = "OBJECT.STORE.DELETE"; public static final String EVENT_OBJECT_STORE_DELETE = "OBJECT.STORE.DELETE";
@ -785,6 +831,40 @@ public class EventTypes {
public static final String EVENT_SHAREDFS_EXPUNGE = "SHAREDFS.EXPUNGE"; public static final String EVENT_SHAREDFS_EXPUNGE = "SHAREDFS.EXPUNGE";
public static final String EVENT_SHAREDFS_RECOVER = "SHAREDFS.RECOVER"; public static final String EVENT_SHAREDFS_RECOVER = "SHAREDFS.RECOVER";
// Resource Limit
public static final String EVENT_RESOURCE_LIMIT_UPDATE = "RESOURCE.LIMIT.UPDATE";
// Management Server
public static final String EVENT_MANAGEMENT_SERVER_REMOVE = "MANAGEMENT.SERVER.REMOVE";
// VM Lease
public static final String VM_LEASE_EXPIRED = "VM.LEASE.EXPIRED";
public static final String VM_LEASE_DISABLED = "VM.LEASE.DISABLED";
public static final String VM_LEASE_CANCELLED = "VM.LEASE.CANCELLED";
public static final String VM_LEASE_EXPIRING = "VM.LEASE.EXPIRING";
// GUI Theme
public static final String EVENT_GUI_THEME_CREATE = "GUI.THEME.CREATE";
public static final String EVENT_GUI_THEME_REMOVE = "GUI.THEME.REMOVE";
public static final String EVENT_GUI_THEME_UPDATE = "GUI.THEME.UPDATE";
// Extension
public static final String EVENT_EXTENSION_CREATE = "EXTENSION.CREATE";
public static final String EVENT_EXTENSION_UPDATE = "EXTENSION.UPDATE";
public static final String EVENT_EXTENSION_DELETE = "EXTENSION.DELETE";
public static final String EVENT_EXTENSION_RESOURCE_REGISTER = "EXTENSION.RESOURCE.REGISTER";
public static final String EVENT_EXTENSION_RESOURCE_UNREGISTER = "EXTENSION.RESOURCE.UNREGISTER";
public static final String EVENT_EXTENSION_CUSTOM_ACTION_ADD = "EXTENSION.CUSTOM.ACTION.ADD";
public static final String EVENT_EXTENSION_CUSTOM_ACTION_UPDATE = "EXTENSION.CUSTOM.ACTION.UPDATE";
public static final String EVENT_EXTENSION_CUSTOM_ACTION_DELETE = "EXTENSION.CUSTOM.ACTION.DELETE";
// Custom Action
public static final String EVENT_CUSTOM_ACTION = "CUSTOM.ACTION";
// Backup Repository
public static final String EVENT_BACKUP_REPOSITORY_ADD = "BACKUP.REPOSITORY.ADD";
public static final String EVENT_BACKUP_REPOSITORY_UPDATE = "BACKUP.REPOSITORY.UPDATE";
static { static {
// TODO: need a way to force author adding event types to declare the entity details as well, with out braking // TODO: need a way to force author adding event types to declare the entity details as well, with out braking
@ -971,16 +1051,34 @@ public class EventTypes {
// Service Offerings // Service Offerings
entityEventDetails.put(EVENT_SERVICE_OFFERING_CREATE, ServiceOffering.class); entityEventDetails.put(EVENT_SERVICE_OFFERING_CREATE, ServiceOffering.class);
entityEventDetails.put(EVENT_SERVICE_OFFERING_CLONE, ServiceOffering.class);
entityEventDetails.put(EVENT_SERVICE_OFFERING_EDIT, ServiceOffering.class); entityEventDetails.put(EVENT_SERVICE_OFFERING_EDIT, ServiceOffering.class);
entityEventDetails.put(EVENT_SERVICE_OFFERING_DELETE, ServiceOffering.class); entityEventDetails.put(EVENT_SERVICE_OFFERING_DELETE, ServiceOffering.class);
// Disk Offerings // Disk Offerings
entityEventDetails.put(EVENT_DISK_OFFERING_CREATE, DiskOffering.class); entityEventDetails.put(EVENT_DISK_OFFERING_CREATE, DiskOffering.class);
entityEventDetails.put(EVENT_DISK_OFFERING_CLONE, DiskOffering.class);
entityEventDetails.put(EVENT_DISK_OFFERING_EDIT, DiskOffering.class); entityEventDetails.put(EVENT_DISK_OFFERING_EDIT, DiskOffering.class);
entityEventDetails.put(EVENT_DISK_OFFERING_DELETE, DiskOffering.class); entityEventDetails.put(EVENT_DISK_OFFERING_DELETE, DiskOffering.class);
// GPU Cards
entityEventDetails.put(EVENT_GPU_CARD_CREATE, GpuCard.class);
entityEventDetails.put(EVENT_GPU_CARD_EDIT, GpuCard.class);
entityEventDetails.put(EVENT_GPU_CARD_DELETE, GpuCard.class);
// vGPU Profiles
entityEventDetails.put(EVENT_VGPU_PROFILE_CREATE, VgpuProfile.class);
entityEventDetails.put(EVENT_VGPU_PROFILE_EDIT, VgpuProfile.class);
entityEventDetails.put(EVENT_VGPU_PROFILE_DELETE, VgpuProfile.class);
// GPU Devices
entityEventDetails.put(EVENT_GPU_DEVICE_CREATE, GpuDevice.class);
entityEventDetails.put(EVENT_GPU_DEVICE_EDIT, GpuDevice.class);
entityEventDetails.put(EVENT_GPU_DEVICE_DELETE, GpuDevice.class);
// Network offerings // Network offerings
entityEventDetails.put(EVENT_NETWORK_OFFERING_CREATE, NetworkOffering.class); entityEventDetails.put(EVENT_NETWORK_OFFERING_CREATE, NetworkOffering.class);
entityEventDetails.put(EVENT_NETWORK_OFFERING_CLONE, NetworkOffering.class);
entityEventDetails.put(EVENT_NETWORK_OFFERING_ASSIGN, NetworkOffering.class); entityEventDetails.put(EVENT_NETWORK_OFFERING_ASSIGN, NetworkOffering.class);
entityEventDetails.put(EVENT_NETWORK_OFFERING_EDIT, NetworkOffering.class); entityEventDetails.put(EVENT_NETWORK_OFFERING_EDIT, NetworkOffering.class);
entityEventDetails.put(EVENT_NETWORK_OFFERING_REMOVE, NetworkOffering.class); entityEventDetails.put(EVENT_NETWORK_OFFERING_REMOVE, NetworkOffering.class);
@ -1064,6 +1162,7 @@ public class EventTypes {
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE, Site2SiteCustomerGateway.class); entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE, Site2SiteCustomerGateway.class);
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE, Site2SiteCustomerGateway.class); entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE, Site2SiteCustomerGateway.class);
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE, Site2SiteCustomerGateway.class); entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE, Site2SiteCustomerGateway.class);
entityEventDetails.put(EVENT_S2S_VPN_GATEWAY_OBSOLETE_PARAMS, Site2SiteCustomerGateway.class);
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_CREATE, Site2SiteVpnConnection.class); entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_CREATE, Site2SiteVpnConnection.class);
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_DELETE, Site2SiteVpnConnection.class); entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_DELETE, Site2SiteVpnConnection.class);
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_RESET, Site2SiteVpnConnection.class); entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_RESET, Site2SiteVpnConnection.class);
@ -1230,6 +1329,12 @@ public class EventTypes {
entityEventDetails.put(EVENT_UPDATE_IMAGE_STORE_ACCESS_STATE, ImageStore.class); entityEventDetails.put(EVENT_UPDATE_IMAGE_STORE_ACCESS_STATE, ImageStore.class);
entityEventDetails.put(EVENT_LIVE_PATCH_SYSTEMVM, "SystemVMs"); entityEventDetails.put(EVENT_LIVE_PATCH_SYSTEMVM, "SystemVMs");
entityEventDetails.put(EVENT_MS_MAINTENANCE_PREPARE, "ManagementServer");
entityEventDetails.put(EVENT_MS_MAINTENANCE_CANCEL, "ManagementServer");
entityEventDetails.put(EVENT_MS_SHUTDOWN_PREPARE, "ManagementServer");
entityEventDetails.put(EVENT_MS_SHUTDOWN_CANCEL, "ManagementServer");
entityEventDetails.put(EVENT_MS_SHUTDOWN, "ManagementServer");
//Object Store //Object Store
entityEventDetails.put(EVENT_OBJECT_STORE_CREATE, ObjectStore.class); entityEventDetails.put(EVENT_OBJECT_STORE_CREATE, ObjectStore.class);
entityEventDetails.put(EVENT_OBJECT_STORE_UPDATE, ObjectStore.class); entityEventDetails.put(EVENT_OBJECT_STORE_UPDATE, ObjectStore.class);
@ -1273,6 +1378,34 @@ public class EventTypes {
entityEventDetails.put(EVENT_SHAREDFS_DESTROY, SharedFS.class); entityEventDetails.put(EVENT_SHAREDFS_DESTROY, SharedFS.class);
entityEventDetails.put(EVENT_SHAREDFS_EXPUNGE, SharedFS.class); entityEventDetails.put(EVENT_SHAREDFS_EXPUNGE, SharedFS.class);
entityEventDetails.put(EVENT_SHAREDFS_RECOVER, SharedFS.class); entityEventDetails.put(EVENT_SHAREDFS_RECOVER, SharedFS.class);
// Management Server
entityEventDetails.put(EVENT_MANAGEMENT_SERVER_REMOVE, "ManagementServer");
// VM Lease
entityEventDetails.put(VM_LEASE_EXPIRED, VirtualMachine.class);
entityEventDetails.put(VM_LEASE_EXPIRING, VirtualMachine.class);
entityEventDetails.put(VM_LEASE_DISABLED, VirtualMachine.class);
entityEventDetails.put(VM_LEASE_CANCELLED, VirtualMachine.class);
// GUI theme
entityEventDetails.put(EVENT_GUI_THEME_CREATE, "GuiTheme");
entityEventDetails.put(EVENT_GUI_THEME_REMOVE, "GuiTheme");
entityEventDetails.put(EVENT_GUI_THEME_UPDATE, "GuiTheme");
// Extension
entityEventDetails.put(EVENT_EXTENSION_CREATE, Extension.class);
entityEventDetails.put(EVENT_EXTENSION_UPDATE, Extension.class);
entityEventDetails.put(EVENT_EXTENSION_DELETE, Extension.class);
entityEventDetails.put(EVENT_EXTENSION_RESOURCE_REGISTER, Extension.class);
entityEventDetails.put(EVENT_EXTENSION_RESOURCE_UNREGISTER, Extension.class);
entityEventDetails.put(EVENT_EXTENSION_CUSTOM_ACTION_ADD, ExtensionCustomAction.class);
entityEventDetails.put(EVENT_EXTENSION_CUSTOM_ACTION_UPDATE, ExtensionCustomAction.class);
entityEventDetails.put(EVENT_EXTENSION_CUSTOM_ACTION_DELETE, ExtensionCustomAction.class);
// Backup Repository
entityEventDetails.put(EVENT_BACKUP_REPOSITORY_ADD, BackupRepositoryService.class);
entityEventDetails.put(EVENT_BACKUP_REPOSITORY_UPDATE, BackupRepositoryService.class);
} }
public static boolean isNetworkEvent(String eventType) { public static boolean isNetworkEvent(String eventType) {

View File

@ -40,7 +40,7 @@ public class OperationTimedoutException extends CloudException {
boolean _isActive; boolean _isActive;
public OperationTimedoutException(Command[] cmds, long agentId, long seqId, int time, boolean isActive) { public OperationTimedoutException(Command[] cmds, long agentId, long seqId, int time, boolean isActive) {
super("Commands " + seqId + " to Host " + agentId + " timed out after " + time); super("Commands " + seqId + " to Host " + agentId + " timed out after " + time + " secs");
_agentId = agentId; _agentId = agentId;
_seqId = seqId; _seqId = seqId;
_time = time; _time = time;

View File

@ -26,17 +26,19 @@ public interface Investigator extends Adapter {
* Returns if the vm is still alive. * Returns if the vm is still alive.
* *
* @param vm to work on. * @param vm to work on.
* @return true if vm is alive, otherwise false
*/ */
public boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM; boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM;
public Status isAgentAlive(Host agent); /**
* Returns the agent status of the host.
*
* @param host
* @return status of the host agent
*/
Status getHostAgentStatus(Host host);
class UnknownVM extends Exception { class UnknownVM extends Exception {
/**
*
*/
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
}; };
} }

View File

@ -57,6 +57,9 @@ public interface Host extends StateObject<Status>, Identity, Partition, HAResour
String HOST_UEFI_ENABLE = "host.uefi.enable"; String HOST_UEFI_ENABLE = "host.uefi.enable";
String HOST_VOLUME_ENCRYPTION = "host.volume.encryption"; String HOST_VOLUME_ENCRYPTION = "host.volume.encryption";
String HOST_INSTANCE_CONVERSION = "host.instance.conversion"; String HOST_INSTANCE_CONVERSION = "host.instance.conversion";
String HOST_VDDK_SUPPORT = "host.vddk.support";
String HOST_VDDK_LIB_DIR = "vddk.lib.dir";
String HOST_VDDK_VERSION = "host.vddk.version";
String HOST_OVFTOOL_VERSION = "host.ovftool.version"; String HOST_OVFTOOL_VERSION = "host.ovftool.version";
String HOST_VIRTV2V_VERSION = "host.virtv2v.version"; String HOST_VIRTV2V_VERSION = "host.virtv2v.version";
String HOST_SSH_PORT = "host.ssh.port"; String HOST_SSH_PORT = "host.ssh.port";
@ -183,6 +186,8 @@ public interface Host extends StateObject<Status>, Identity, Partition, HAResour
*/ */
Long getManagementServerId(); Long getManagementServerId();
Long getLastManagementServerId();
/* /*
*@return removal date *@return removal date
*/ */
@ -217,4 +222,6 @@ public interface Host extends StateObject<Status>, Identity, Partition, HAResour
ResourceState getResourceState(); ResourceState getResourceState();
CPU.CPUArch getArch(); CPU.CPUArch getArch();
String getStorageAccessGroups();
} }

View File

@ -36,5 +36,4 @@ public interface HostStats {
public HostStats getHostStats(); public HostStats getHostStats();
public double getLoadAverage(); public double getLoadAverage();
// public double getXapiMemoryUsageKBs();
} }

View File

@ -127,6 +127,7 @@ public enum Status {
s_fsm.addTransition(Status.Connecting, Event.HostDown, Status.Down); s_fsm.addTransition(Status.Connecting, Event.HostDown, Status.Down);
s_fsm.addTransition(Status.Connecting, Event.Ping, Status.Connecting); s_fsm.addTransition(Status.Connecting, Event.Ping, Status.Connecting);
s_fsm.addTransition(Status.Connecting, Event.ManagementServerDown, Status.Disconnected); s_fsm.addTransition(Status.Connecting, Event.ManagementServerDown, Status.Disconnected);
s_fsm.addTransition(Status.Connecting, Event.StartAgentRebalance, Status.Rebalancing);
s_fsm.addTransition(Status.Connecting, Event.AgentDisconnected, Status.Alert); s_fsm.addTransition(Status.Connecting, Event.AgentDisconnected, Status.Alert);
s_fsm.addTransition(Status.Up, Event.PingTimeout, Status.Alert); s_fsm.addTransition(Status.Up, Event.PingTimeout, Status.Alert);
s_fsm.addTransition(Status.Up, Event.AgentDisconnected, Status.Alert); s_fsm.addTransition(Status.Up, Event.AgentDisconnected, Status.Alert);

View File

@ -56,6 +56,7 @@ public class Hypervisor {
public static final HypervisorType Ovm3 = new HypervisorType("Ovm3", ImageFormat.RAW); public static final HypervisorType Ovm3 = new HypervisorType("Ovm3", ImageFormat.RAW);
public static final HypervisorType LXC = new HypervisorType("LXC"); public static final HypervisorType LXC = new HypervisorType("LXC");
public static final HypervisorType Custom = new HypervisorType("Custom", null, EnumSet.of(RootDiskSizeOverride)); public static final HypervisorType Custom = new HypervisorType("Custom", null, EnumSet.of(RootDiskSizeOverride));
public static final HypervisorType External = new HypervisorType("External", null, EnumSet.of(RootDiskSizeOverride));
public static final HypervisorType Any = new HypervisorType("Any"); /*If you don't care about the hypervisor type*/ public static final HypervisorType Any = new HypervisorType("Any"); /*If you don't care about the hypervisor type*/
private final String name; private final String name;
private final ImageFormat imageFormat; private final ImageFormat imageFormat;

View File

@ -44,6 +44,8 @@ public interface KubernetesCluster extends ControlledEntity, com.cloud.utils.fsm
AutoscaleRequested, AutoscaleRequested,
ScaleUpRequested, ScaleUpRequested,
ScaleDownRequested, ScaleDownRequested,
AddNodeRequested,
RemoveNodeRequested,
UpgradeRequested, UpgradeRequested,
OperationSucceeded, OperationSucceeded,
OperationFailed, OperationFailed,
@ -60,6 +62,8 @@ public interface KubernetesCluster extends ControlledEntity, com.cloud.utils.fsm
Scaling("Transient state in which resources are either getting scaled up/down"), Scaling("Transient state in which resources are either getting scaled up/down"),
ScalingStoppedCluster("Transient state in which the service offerings of stopped clusters are getting scaled"), ScalingStoppedCluster("Transient state in which the service offerings of stopped clusters are getting scaled"),
Upgrading("Transient state in which cluster is getting upgraded"), Upgrading("Transient state in which cluster is getting upgraded"),
Importing("Transient state in which additional nodes are added as worker nodes to a cluster"),
RemovingNodes("Transient state in which additional nodes are removed from a cluster"),
Alert("State to represent Kubernetes clusters which are not in expected desired state (operationally in active control place, stopped cluster VM's etc)."), Alert("State to represent Kubernetes clusters which are not in expected desired state (operationally in active control place, stopped cluster VM's etc)."),
Recovering("State in which Kubernetes cluster is recovering from alert state"), Recovering("State in which Kubernetes cluster is recovering from alert state"),
Destroyed("End state of Kubernetes cluster in which all resources are destroyed, cluster will not be usable further"), Destroyed("End state of Kubernetes cluster in which all resources are destroyed, cluster will not be usable further"),
@ -84,6 +88,8 @@ public interface KubernetesCluster extends ControlledEntity, com.cloud.utils.fsm
s_fsm.addTransition(State.Stopping, Event.OperationFailed, State.Alert); s_fsm.addTransition(State.Stopping, Event.OperationFailed, State.Alert);
s_fsm.addTransition(State.Stopped, Event.StartRequested, State.Starting); s_fsm.addTransition(State.Stopped, Event.StartRequested, State.Starting);
s_fsm.addTransition(State.Stopped, Event.OperationSucceeded, State.Stopped);
s_fsm.addTransition(State.Running, Event.OperationSucceeded, State.Running);
s_fsm.addTransition(State.Running, Event.FaultsDetected, State.Alert); s_fsm.addTransition(State.Running, Event.FaultsDetected, State.Alert);
@ -92,7 +98,7 @@ public interface KubernetesCluster extends ControlledEntity, com.cloud.utils.fsm
s_fsm.addTransition(State.Running, Event.ScaleDownRequested, State.Scaling); s_fsm.addTransition(State.Running, Event.ScaleDownRequested, State.Scaling);
s_fsm.addTransition(State.Stopped, Event.ScaleUpRequested, State.ScalingStoppedCluster); s_fsm.addTransition(State.Stopped, Event.ScaleUpRequested, State.ScalingStoppedCluster);
s_fsm.addTransition(State.Scaling, Event.OperationSucceeded, State.Running); s_fsm.addTransition(State.Scaling, Event.OperationSucceeded, State.Running);
s_fsm.addTransition(State.Scaling, Event.OperationFailed, State.Alert); s_fsm.addTransition(State.Scaling, Event.OperationFailed, State.Running);
s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationSucceeded, State.Stopped); s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationSucceeded, State.Stopped);
s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationFailed, State.Alert); s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationFailed, State.Alert);
@ -100,6 +106,17 @@ public interface KubernetesCluster extends ControlledEntity, com.cloud.utils.fsm
s_fsm.addTransition(State.Upgrading, Event.OperationSucceeded, State.Running); s_fsm.addTransition(State.Upgrading, Event.OperationSucceeded, State.Running);
s_fsm.addTransition(State.Upgrading, Event.OperationFailed, State.Alert); s_fsm.addTransition(State.Upgrading, Event.OperationFailed, State.Alert);
s_fsm.addTransition(State.Running, Event.AddNodeRequested, State.Importing);
s_fsm.addTransition(State.Alert, Event.AddNodeRequested, State.Importing);
s_fsm.addTransition(State.Importing, Event.OperationSucceeded, State.Running);
s_fsm.addTransition(State.Importing, Event.OperationFailed, State.Running);
s_fsm.addTransition(State.Alert, Event.OperationSucceeded, State.Running);
s_fsm.addTransition(State.Running, Event.RemoveNodeRequested, State.RemovingNodes);
s_fsm.addTransition(State.Alert, Event.RemoveNodeRequested, State.RemovingNodes);
s_fsm.addTransition(State.RemovingNodes, Event.OperationSucceeded, State.Running);
s_fsm.addTransition(State.RemovingNodes, Event.OperationFailed, State.Running);
s_fsm.addTransition(State.Alert, Event.RecoveryRequested, State.Recovering); s_fsm.addTransition(State.Alert, Event.RecoveryRequested, State.Recovering);
s_fsm.addTransition(State.Recovering, Event.OperationSucceeded, State.Running); s_fsm.addTransition(State.Recovering, Event.OperationSucceeded, State.Running);
s_fsm.addTransition(State.Recovering, Event.OperationFailed, State.Alert); s_fsm.addTransition(State.Recovering, Event.OperationFailed, State.Alert);
@ -146,4 +163,14 @@ public interface KubernetesCluster extends ControlledEntity, com.cloud.utils.fsm
Long getMaxSize(); Long getMaxSize();
Long getSecurityGroupId(); Long getSecurityGroupId();
ClusterType getClusterType(); ClusterType getClusterType();
Long getControlNodeServiceOfferingId();
Long getWorkerNodeServiceOfferingId();
Long getEtcdNodeServiceOfferingId();
Long getControlNodeTemplateId();
Long getWorkerNodeTemplateId();
Long getEtcdNodeTemplateId();
Long getEtcdNodeCount();
Long getCniConfigId();
String getCniConfigDetails();
boolean isCsiEnabled();
} }

View File

@ -18,14 +18,26 @@ package com.cloud.kubernetes.cluster;
import org.apache.cloudstack.acl.ControlledEntity; import org.apache.cloudstack.acl.ControlledEntity;
import java.util.List;
import java.util.Map;
import com.cloud.user.Account; import com.cloud.user.Account;
import com.cloud.uservm.UserVm; import com.cloud.uservm.UserVm;
import com.cloud.utils.component.Adapter; import com.cloud.utils.component.Adapter;
public interface KubernetesServiceHelper extends Adapter { public interface KubernetesServiceHelper extends Adapter {
enum KubernetesClusterNodeType {
CONTROL, WORKER, ETCD, DEFAULT
}
ControlledEntity findByUuid(String uuid); ControlledEntity findByUuid(String uuid);
ControlledEntity findByVmId(long vmId); ControlledEntity findByVmId(long vmId);
void checkVmCanBeDestroyed(UserVm userVm); void checkVmCanBeDestroyed(UserVm userVm);
void checkVmAffinityGroupsCanBeUpdated(UserVm userVm);
boolean isValidNodeType(String nodeType);
Map<String, Long> getServiceOfferingNodeTypeMap(Map<String, Map<String, String>> serviceOfferingNodeTypeMap);
Map<String, Long> getTemplateNodeTypeMap(Map<String, Map<String, String>> templateNodeTypeMap);
Map<String, List<Long>> getAffinityGroupNodeTypeMap(Map<String, Map<String, String>> affinityGroupNodeTypeMap);
void cleanupForAccount(Account account); void cleanupForAccount(Account account);
} }

View File

@ -99,4 +99,5 @@ public interface IpAddress extends ControlledEntity, Identity, InternalIdentity,
boolean isForSystemVms(); boolean isForSystemVms();
boolean isForRouter();
} }

View File

@ -206,6 +206,7 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
public static final Provider Tungsten = new Provider("Tungsten", false); public static final Provider Tungsten = new Provider("Tungsten", false);
public static final Provider Nsx = new Provider("Nsx", false); public static final Provider Nsx = new Provider("Nsx", false);
public static final Provider Netris = new Provider("Netris", false);
private final String name; private final String name;
private final boolean isExternal; private final boolean isExternal;
@ -509,4 +510,6 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
Integer getPrivateMtu(); Integer getPrivateMtu();
Integer getNetworkCidrSize(); Integer getNetworkCidrSize();
boolean getKeepMacAddressOnPublicNic();
} }

View File

@ -309,6 +309,8 @@ public interface NetworkModel {
NicProfile getNicProfile(VirtualMachine vm, long networkId, String broadcastUri); NicProfile getNicProfile(VirtualMachine vm, long networkId, String broadcastUri);
NicProfile getNicProfile(VirtualMachine vm, Nic nic, DataCenter dataCenter);
Set<Long> getAvailableIps(Network network, String requestedIp); Set<Long> getAvailableIps(Network network, String requestedIp);
String getDomainNetworkDomain(long domainId, long zoneId); String getDomainNetworkDomain(long domainId, long zoneId);

View File

@ -385,6 +385,11 @@ public class NetworkProfile implements Network {
return networkCidrSize; return networkCidrSize;
} }
@Override
public boolean getKeepMacAddressOnPublicNic() {
return true;
}
@Override @Override
public String toString() { public String toString() {
return String.format("NetworkProfile %s", return String.format("NetworkProfile %s",

View File

@ -19,7 +19,6 @@ package com.cloud.network;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.cloud.dc.DataCenter;
import org.apache.cloudstack.acl.ControlledEntity; import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.api.command.admin.address.ReleasePodIpCmdByAdmin; import org.apache.cloudstack.api.command.admin.address.ReleasePodIpCmdByAdmin;
import org.apache.cloudstack.api.command.admin.network.DedicateGuestVlanRangeCmd; import org.apache.cloudstack.api.command.admin.network.DedicateGuestVlanRangeCmd;
@ -39,13 +38,16 @@ import org.apache.cloudstack.api.command.user.network.UpdateNetworkCmd;
import org.apache.cloudstack.api.command.user.vm.ListNicsCmd; import org.apache.cloudstack.api.command.user.vm.ListNicsCmd;
import org.apache.cloudstack.api.response.AcquirePodIpCmdResponse; import org.apache.cloudstack.api.response.AcquirePodIpCmdResponse;
import org.apache.cloudstack.framework.config.ConfigKey; import org.apache.cloudstack.framework.config.ConfigKey;
import org.apache.cloudstack.network.element.InternalLoadBalancerElementService;
import com.cloud.agent.api.to.NicTO;
import com.cloud.dc.DataCenter;
import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientAddressCapacityException; import com.cloud.exception.InsufficientAddressCapacityException;
import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.InvalidParameterValueException;
import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException; import com.cloud.exception.ResourceUnavailableException;
import com.cloud.exception.InvalidParameterValueException;
import com.cloud.network.Network.IpAddresses; import com.cloud.network.Network.IpAddresses;
import com.cloud.network.Network.Service; import com.cloud.network.Network.Service;
import com.cloud.network.Networks.TrafficType; import com.cloud.network.Networks.TrafficType;
@ -57,7 +59,6 @@ import com.cloud.utils.Pair;
import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.vm.Nic; import com.cloud.vm.Nic;
import com.cloud.vm.NicSecondaryIp; import com.cloud.vm.NicSecondaryIp;
import org.apache.cloudstack.network.element.InternalLoadBalancerElementService;
/** /**
* The NetworkService interface is the "public" api to entities that make requests to the orchestration engine * The NetworkService interface is the "public" api to entities that make requests to the orchestration engine
@ -272,4 +273,12 @@ public interface NetworkService {
InternalLoadBalancerElementService getInternalLoadBalancerElementByNetworkServiceProviderId(long networkProviderId); InternalLoadBalancerElementService getInternalLoadBalancerElementByNetworkServiceProviderId(long networkProviderId);
InternalLoadBalancerElementService getInternalLoadBalancerElementById(long providerId); InternalLoadBalancerElementService getInternalLoadBalancerElementById(long providerId);
List<InternalLoadBalancerElementService> getInternalLoadBalancerElements(); List<InternalLoadBalancerElementService> getInternalLoadBalancerElements();
boolean handleCksIsoOnNetworkVirtualRouter(Long virtualRouterId, boolean mount) throws ResourceUnavailableException;
IpAddresses getIpAddressesFromIps(String ipAddress, String ip6Address, String macAddress);
String getNicVlanValueForExternalVm(NicTO nic);
Long getPreferredNetworkIdForPublicIpRuleAssignment(IpAddress ip, Long networkId);
} }

View File

@ -129,7 +129,8 @@ public class Networks {
UnDecided(null, null), UnDecided(null, null),
OpenDaylight("opendaylight", String.class), OpenDaylight("opendaylight", String.class),
TUNGSTEN("tf", String.class), TUNGSTEN("tf", String.class),
NSX("nsx", String.class); NSX("nsx", String.class),
Netris("netris", String.class);
private final String scheme; private final String scheme;
private final Class<?> type; private final Class<?> type;

View File

@ -41,4 +41,6 @@ public interface PhysicalNetworkTrafficType extends InternalIdentity, Identity {
String getHypervNetworkLabel(); String getHypervNetworkLabel();
String getOvm3NetworkLabel(); String getOvm3NetworkLabel();
String getVlan();
} }

View File

@ -26,7 +26,7 @@ public interface RouterHealthCheckResult {
String getCheckType(); String getCheckType();
boolean getCheckResult(); VirtualNetworkApplianceService.RouterHealthStatus getCheckResult();
Date getLastUpdateTime(); Date getLastUpdateTime();

View File

@ -0,0 +1,358 @@
// 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.
package com.cloud.network;
import java.util.List;
public class SDNProviderNetworkRule {
protected long domainId;
protected long accountId;
protected long zoneId;
protected Long networkResourceId;
protected String networkResourceName;
protected boolean isVpcResource;
protected long vmId;
protected long ruleId;
protected String publicIp;
protected String vmIp;
protected String publicPort;
protected String privatePort;
protected String protocol;
protected String algorithm;
protected List<String> sourceCidrList;
protected List<String> destinationCidrList;
protected Integer icmpCode;
protected Integer icmpType;
protected String trafficType;
protected Network.Service service;
public long getDomainId() {
return domainId;
}
public void setDomainId(long domainId) {
this.domainId = domainId;
}
public long getAccountId() {
return accountId;
}
public void setAccountId(long accountId) {
this.accountId = accountId;
}
public long getZoneId() {
return zoneId;
}
public void setZoneId(long zoneId) {
this.zoneId = zoneId;
}
public Long getNetworkResourceId() {
return networkResourceId;
}
public void setNetworkResourceId(Long networkResourceId) {
this.networkResourceId = networkResourceId;
}
public String getNetworkResourceName() {
return networkResourceName;
}
public void setNetworkResourceName(String networkResourceName) {
this.networkResourceName = networkResourceName;
}
public boolean isVpcResource() {
return isVpcResource;
}
public void setVpcResource(boolean vpcResource) {
isVpcResource = vpcResource;
}
public long getVmId() {
return vmId;
}
public void setVmId(long vmId) {
this.vmId = vmId;
}
public long getRuleId() {
return ruleId;
}
public void setRuleId(long ruleId) {
this.ruleId = ruleId;
}
public String getPublicIp() {
return publicIp;
}
public void setPublicIp(String publicIp) {
this.publicIp = publicIp;
}
public String getVmIp() {
return vmIp;
}
public void setVmIp(String vmIp) {
this.vmIp = vmIp;
}
public String getPublicPort() {
return publicPort;
}
public void setPublicPort(String publicPort) {
this.publicPort = publicPort;
}
public String getPrivatePort() {
return privatePort;
}
public void setPrivatePort(String privatePort) {
this.privatePort = privatePort;
}
public String getProtocol() {
return protocol;
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public void setAlgorithm(String algorithm) {
this.algorithm = algorithm;
}
public String getAlgorithm() {
return algorithm;
}
public Network.Service getService() {
return service;
}
public void setService(Network.Service service) {
this.service = service;
}
public Integer getIcmpCode() {
return icmpCode;
}
public void setIcmpCode(Integer icmpCode) {
this.icmpCode = icmpCode;
}
public Integer getIcmpType() {
return icmpType;
}
public void setIcmpType(Integer icmpType) {
this.icmpType = icmpType;
}
public List<String> getSourceCidrList() {
return sourceCidrList;
}
public void setSourceCidrList(List<String> sourceCidrList) {
this.sourceCidrList = sourceCidrList;
}
public List<String> getDestinationCidrList() {
return destinationCidrList;
}
public void setDestinationCidrList(List<String> destinationCidrList) {
this.destinationCidrList = destinationCidrList;
}
public String getTrafficType() {
return trafficType;
}
public void setTrafficType(String trafficType) {
this.trafficType = trafficType;
}
public static class Builder {
public long domainId;
public long accountId;
public long zoneId;
public Long networkResourceId;
public String networkResourceName;
public boolean isVpcResource;
public long vmId;
public long ruleId;
public String publicIp;
public String vmIp;
public String publicPort;
public String privatePort;
public String protocol;
public String algorithm;
public List<String> sourceCidrList;
public List<String> destinationCidrList;
public String trafficType;
public Integer icmpType;
public Integer icmpCode;
public Network.Service service;
public Builder() {
// Default constructor
}
public Builder setDomainId(long domainId) {
this.domainId = domainId;
return this;
}
public Builder setAccountId(long accountId) {
this.accountId = accountId;
return this;
}
public Builder setZoneId(long zoneId) {
this.zoneId = zoneId;
return this;
}
public Builder setNetworkResourceId(Long networkResourceId) {
this.networkResourceId = networkResourceId;
return this;
}
public Builder setNetworkResourceName(String networkResourceName) {
this.networkResourceName = networkResourceName;
return this;
}
public Builder setVpcResource(boolean isVpcResource) {
this.isVpcResource = isVpcResource;
return this;
}
public Builder setVmId(long vmId) {
this.vmId = vmId;
return this;
}
public Builder setRuleId(long ruleId) {
this.ruleId = ruleId;
return this;
}
public Builder setPublicIp(String publicIp) {
this.publicIp = publicIp;
return this;
}
public Builder setVmIp(String vmIp) {
this.vmIp = vmIp;
return this;
}
public Builder setPublicPort(String publicPort) {
this.publicPort = publicPort;
return this;
}
public Builder setPrivatePort(String privatePort) {
this.privatePort = privatePort;
return this;
}
public Builder setProtocol(String protocol) {
this.protocol = protocol;
return this;
}
public Builder setAlgorithm(String algorithm) {
this.algorithm = algorithm;
return this;
}
public Builder setTrafficType(String trafficType) {
this.trafficType = trafficType;
return this;
}
public Builder setIcmpType(Integer icmpType) {
this.icmpType = icmpType;
return this;
}
public Builder setIcmpCode(Integer icmpCode) {
this.icmpCode = icmpCode;
return this;
}
public Builder setSourceCidrList(List<String> sourceCidrList) {
this.sourceCidrList = sourceCidrList;
return this;
}
public Builder setDestinationCidrList(List<String> destinationCidrList) {
this.destinationCidrList = destinationCidrList;
return this;
}
public Builder setService(Network.Service service) {
this.service = service;
return this;
}
public SDNProviderNetworkRule build() {
SDNProviderNetworkRule rule = new SDNProviderNetworkRule();
rule.setDomainId(this.domainId);
rule.setAccountId(this.accountId);
rule.setZoneId(this.zoneId);
rule.setNetworkResourceId(this.networkResourceId);
rule.setNetworkResourceName(this.networkResourceName);
rule.setVpcResource(this.isVpcResource);
rule.setVmId(this.vmId);
rule.setVmIp(this.vmIp);
rule.setPublicIp(this.publicIp);
rule.setPublicPort(this.publicPort);
rule.setPrivatePort(this.privatePort);
rule.setProtocol(this.protocol);
rule.setRuleId(this.ruleId);
rule.setAlgorithm(this.algorithm);
rule.setIcmpType(this.icmpType);
rule.setIcmpCode(this.icmpCode);
rule.setSourceCidrList(this.sourceCidrList);
rule.setDestinationCidrList(this.destinationCidrList);
rule.setTrafficType(this.trafficType);
rule.setService(service);
return rule;
}
}
}

View File

@ -24,7 +24,7 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface Site2SiteVpnConnection extends ControlledEntity, InternalIdentity, Displayable { public interface Site2SiteVpnConnection extends ControlledEntity, InternalIdentity, Displayable {
enum State { enum State {
Pending, Connecting, Connected, Disconnected, Error, Pending, Connecting, Connected, Disconnected, Error, Removed
} }
@Override @Override

View File

@ -87,4 +87,8 @@ public interface VirtualNetworkApplianceService {
Pair<Boolean, String> performRouterHealthChecks(long routerId); Pair<Boolean, String> performRouterHealthChecks(long routerId);
<T extends VirtualRouter> void collectNetworkStatistics(T router, Nic nic); <T extends VirtualRouter> void collectNetworkStatistics(T router, Nic nic);
enum RouterHealthStatus{
SUCCESS, FAILED, WARNING, UNKNOWN;
}
} }

View File

@ -70,6 +70,8 @@ public interface AutoScaleService {
Counter createCounter(CreateCounterCmd cmd); Counter createCounter(CreateCounterCmd cmd);
Counter getCounter(long counterId);
boolean deleteCounter(long counterId) throws ResourceInUseException; boolean deleteCounter(long counterId) throws ResourceInUseException;
List<? extends Counter> listCounters(ListCountersCmd cmd); List<? extends Counter> listCounters(ListCountersCmd cmd);

View File

@ -23,6 +23,7 @@ import com.cloud.deploy.DeployDestination;
import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.ResourceUnavailableException; import com.cloud.exception.ResourceUnavailableException;
import com.cloud.network.IpAddress;
import com.cloud.network.Network; import com.cloud.network.Network;
import com.cloud.network.Network.Capability; import com.cloud.network.Network.Capability;
import com.cloud.network.Network.Provider; import com.cloud.network.Network.Provider;
@ -87,6 +88,14 @@ public interface NetworkElement extends Adapter {
boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext context) throws ConcurrentOperationException, boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext context) throws ConcurrentOperationException,
ResourceUnavailableException; ResourceUnavailableException;
/**
* Release IP from the network provider if reserved
* @param ipAddress
*/
default boolean releaseIp(IpAddress ipAddress) {
return true;
}
/** /**
* The network is being shutdown. * The network is being shutdown.
* @param network * @param network

View File

@ -17,12 +17,40 @@
package com.cloud.network.element; package com.cloud.network.element;
import java.util.List; import java.util.List;
import java.util.Objects;
import com.cloud.exception.ResourceUnavailableException; import com.cloud.exception.ResourceUnavailableException;
import com.cloud.network.Network; import com.cloud.network.Network;
import com.cloud.network.rules.FirewallRule;
import com.cloud.network.rules.PortForwardingRule; import com.cloud.network.rules.PortForwardingRule;
import com.cloud.network.vpc.NetworkACLItem;
public interface PortForwardingServiceProvider extends NetworkElement, IpDeployingRequester { public interface PortForwardingServiceProvider extends NetworkElement, IpDeployingRequester {
static String getPublicPortRange(PortForwardingRule rule) {
return Objects.equals(rule.getSourcePortStart(), rule.getSourcePortEnd()) ?
String.valueOf(rule.getSourcePortStart()) :
String.valueOf(rule.getSourcePortStart()).concat("-").concat(String.valueOf(rule.getSourcePortEnd()));
}
static String getPrivatePFPortRange(PortForwardingRule rule) {
return rule.getDestinationPortStart() == rule.getDestinationPortEnd() ?
String.valueOf(rule.getDestinationPortStart()) :
String.valueOf(rule.getDestinationPortStart()).concat("-").concat(String.valueOf(rule.getDestinationPortEnd()));
}
static String getPrivatePortRange(FirewallRule rule) {
return Objects.equals(rule.getSourcePortStart(), rule.getSourcePortEnd()) ?
String.valueOf(rule.getSourcePortStart()) :
String.valueOf(rule.getSourcePortStart()).concat("-").concat(String.valueOf(rule.getSourcePortEnd()));
}
static String getPrivatePortRangeForACLRule(NetworkACLItem rule) {
return Objects.equals(rule.getSourcePortStart(), rule.getSourcePortEnd()) ?
String.valueOf(rule.getSourcePortStart()) :
String.valueOf(rule.getSourcePortStart()).concat("-").concat(String.valueOf(rule.getSourcePortEnd()));
}
/** /**
* Apply rules * Apply rules
* @param network * @param network

View File

@ -55,4 +55,8 @@ public interface VpcProvider extends NetworkElement {
boolean applyACLItemsToPrivateGw(PrivateGateway gateway, List<? extends NetworkACLItem> rules) throws ResourceUnavailableException; boolean applyACLItemsToPrivateGw(PrivateGateway gateway, List<? extends NetworkACLItem> rules) throws ResourceUnavailableException;
boolean updateVpcSourceNatIp(Vpc vpc, IpAddress address); boolean updateVpcSourceNatIp(Vpc vpc, IpAddress address);
default boolean updateVpc(Vpc vpc, String previousVpcName) {
return true;
}
} }

Some files were not shown because too many files have changed in this diff Show More