35842 Commits

Author SHA1 Message Date
dahn
0d3ac9f8d9
interpret /etc/redhet-release better (#7570) 2023-06-09 10:29:42 +02:00
Abhishek Kumar
03910c2783 Merge remote-tracking branch 'apache/4.17' into 4.18 2023-06-08 15:34:03 +05:30
Abhishek Kumar
20865901d1 Merge remote-tracking branch 'apache/4.16' into 4.17 2023-06-08 15:33:20 +05:30
Abhishek Kumar
24da2bcf78
marvin: fix test_data for parsing failure (#7602)
PR #6512 seems to have broken the test_data.py. This PR fixes test_data.
2023-06-08 15:32:04 +05:30
Vishesh
811b6293af
.github: Use parallel builds for github actions (#7592) 2023-06-07 13:17:29 +02:00
Abhishek Kumar
b030ea19a4 Merge remote-tracking branch 'apache/4.17' into 4.18 2023-06-06 13:12:12 +05:30
Abhishek Kumar
f298008215 Merge remote-tracking branch 'apache/4.16' into 4.17 2023-06-06 13:11:24 +05:30
Pearl Dsilva
bd5d478a3a
Refactor test and change IP range (#6512)
* Refactor test and change IP range

* countdown from 254 to allow multiple pseudo public nets counting up from 0

* cleanup

* location of asserts improved

---------

Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: Daan Hoogland <daan@onecht.net>
2023-06-05 16:39:33 +02:00
Abhishek Kumar
2d6a069812
server: improve storage GC to skip expunging possible duplicate volumes (#7313)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-06-05 10:03:24 +02:00
Wei Zhou
b2e9993b0a
vmware: do not create vm datastore when attach an existing volume on solidfire (#7160) 2023-06-01 14:26:57 +02:00
Abhishek Kumar
0941d01e97
secondary-storage: delete backedup snapshot dir on delete (#7524)
* secondary-storage: delete backedup snapshot dir on delete

Fixes #7516

When a backed-up snapshot is deleted and the snapshot file is present in the same name directory (probably only for VMware), the whole directory can be deleted.

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

* refactor

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

* resolve comment

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

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-06-01 15:48:28 +05:30
Abhishek Kumar
7319debc87
cks: k8s cluster on vpc tier (#7479)
* cks: cluster on vpc tier

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

* fix

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

* wip

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

* fix

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

* refactor

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

* changes

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

* fix test

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

* fix test

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

* fix test

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

* fix

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

* python fix

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

* fix trailing space

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

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-06-01 15:29:06 +05:30
Abhishek Kumar
ef9dec11e7
guestos: add Windows Server 2022 (#7508)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-31 16:02:48 +02:00
Abhishek Kumar
17e765e6bc
test: reduce PowerMock usage for code coverage (#7452)
JaCoCo used for code coverage calculation in the project doesn't support PowerMockito classes.
This PR attemps to reduce usage of PowerMockito.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-30 11:43:01 +02:00
Abhishek Kumar
f636580195
cks,ui: allow changing stopped cluster offering, improvements (#7475)
* cks,ui: allow changing stopped cluster offering, improvements

Fixes #7454

- Allows changing compute offering for a stopped cluster
- Allows compute offering change when the cluster has autoscaling enabled

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-29 15:58:06 +05:30
Ben
c3535880d2
Create user 'cloud' in cloudstack-usage postinstall (#7559)
This ensures the chown 'cloud:cloud' command (later in the same file)
is always performed with no error.
2023-05-26 12:44:02 +02:00
Rohit Yadav
4138ca7c5d systemvmtemplate: fix Debian 11.7.0 ISO URL
Fixes systemvmtemplate build issue

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-05-25 22:15:28 +05:30
Abhishek Kumar
8849e0f464
server: fix volume detach operation when no vm host (#7526)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-25 15:48:27 +02:00
Rohit Yadav
2b3e2e48a0
ui: show zones and offerings to users (#7557)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-05-25 13:44:44 +02:00
Nicolas Vazquez
5e71cea2c5
Fix Tungsten Fabric errors on adding a new zone due to duplicated entries on ntwk_service_map (#7455)
* Fix Tungsten Fabric errors on adding a new zone due to duplicated entries on ntwk_service_map

* Address review comments
2023-05-24 11:00:29 -03:00
Abhishek Kumar
22871ad2da
ui: fix infocard tempalte, iso fields (#7527)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-12 18:40:11 +02:00
Abhishek Kumar
32caf9057e
engine-storage: fix errored template becomes active (#7485)
* engine-storage: fix errored template becomes active

Fixes #7342

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

* test

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

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-12 15:23:16 +02:00
Abhishek Kumar
c47554919c
ui: fix tags for security group rules (#7424)
Fixes #7412

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-12 13:31:57 +02:00
Vishesh
83fd75f707
Marvin: Fix deployDataCenter's cleanup (#7521) 2023-05-12 10:46:52 +02:00
Abhishek Kumar
44024a8a8b
github-actions: fix ui build workflow (#7522)
package-lock.json is not removed.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-12 12:54:23 +05:30
Oscar Sandoval
b6443a2b1f
increase log detail for limit checking, fix getDomainReservation() (#7506)
In troubleshooting ops issues we see logs like:

Maximum domain resource limits of Type 'user_vm' for Domain Id = 763 is exceeded: Domain Resource Limit = (1 bytes) 1, Current Domain Resource Amount = (0 bytes) 0, Requested Resource Amount = (1 bytes) 1."

However there is one missing value (currentResourceReservation) that is used in the calculation of limit check but it is not logged, which leads to confusion. Above we see we are using “0” and requested 1, with our limit being 1, but was rejected. Without logging all the values used in the calculation we don’t understand why it failed.

Additionally, if we had this log above it would be clearer that a second bug is occurring. When we query for domain level resource reservations in “getDomainReservation” the actual SearchBuilder is the listAccountAndTypeSearch, not the listDomainAndTypeSearch. As a result, when we call getDomainReservation the query returns any outstanding domain reservation for any account, as domain ID is not a valid filter for the account search.

This PR:

Increases detailed information in log for checking resource limit to include reservations information for functions: checkDomainResourceLimit() and checkAccountResourceLimit

Fixes getDomainReservation() to use listDomainAndTypeSearch instead of listAccountAndTypeSearch

Co-authored-by: Oscar Sandoval <osandovalocana@apple.com>
2023-05-12 12:53:18 +05:30
Abhishek Kumar
a0eb0aa5f7
api,server: fix VM.CREATE events on vm deploy without start (#7421)
Fixes #6697

Allows the server to generate started and completed events for VM.CREATE event type when VM is deployed with startvm=false.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-11 23:23:00 +05:30
Wei Zhou
8c546bd5a6
router: do not restart conntrackd if no guest networks (issue 6702) (#7265)
This PR fixes #6702

The service conntrackd will be started by the script /opt/cloud/bin/cs/CsRedundant.py, therefore add it to disabled_svcs so it is not started automatically when VR is started.
2023-05-11 12:59:32 +05:30
Abhishek Kumar
d9e0a3e6c3
server: add config SSVM capacity scan (#7448)
Fixes #7438

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-11 12:58:10 +05:30
Wei Zhou
5e442df5a0
ssvm: continue with other secondary storages if fails to program a secondary storage (#7264)
This PR fixes #7244
2023-05-11 12:57:51 +05:30
Abhishek Kumar
e613b90fee
ui: set default cpu, memory value for k8s version (#7513)
By default, use mincpunumber=2 and minmemory=2048 as these are k8s minimum required spec.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-11 12:55:35 +05:30
Wei Zhou
a582b2a5a1
ui: fix sourceIP is not passed when create internal LB (#7512)
This PR fixes the issue that sourceIP is not passed when create internal LB on UI.
2023-05-11 12:55:01 +05:30
Rohit Yadav
0e4a5a1fa4 .github: restrict sonar and CI actions to only apache/cloudstack
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-05-10 14:07:29 +05:30
Daan Hoogland
66cbe0a051 replace pull_request_target with pull_request 2023-05-09 18:40:20 +02:00
Abhishek Kumar
88ff77dae1
ui: fix action notifications (#7499)
Some UI actions were missing title and description in pollJob method preventing notification for them to be published.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-08 17:46:17 +05:30
Wei Zhou
ea2b537985
fix tools/build/setnextversion.sh: do not update tools/apidoc/pom.xml (#7163)
Steps to reproduce the issue

(1) on ubuntu server, run "git checkout 4.17.2.0"
(2) packaging
cd packaging/
./build-deb.sh -b test1

expected result: succeed
actual result:

[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project org.apache.cloudstack:cloud-apidoc:4.17.2.0-test1-test1 (/data/cloudstack/tools/apidoc/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.apache.cloudstack:cloud-apidoc:4.17.2.0-test1-test1: Could not find artifact org.apache.cloudstack:cloud-tools:pom:4.17.2.0-test1-test1 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 25, column 13 -> [Help 2]
2023-05-08 13:00:36 +02:00
dahn
897dad619b
marvin: replace encodestring for encodebytes (#7027)
Fixes: #6962
2023-05-08 12:51:12 +05:30
kiranchavala
ad21e86342
addAnnotation: added the various entity type supported by the api call (#7478)
This PR adds documentation to the addAnnotation api call

https://cloudstack.apache.org/api/apidocs-4.18/apis/addAnnotation.html

Co-authored-by: Kiran Chavala <kiranchavala@Kirans-MacBook-Air.local>
2023-05-08 12:19:38 +05:30
Marcus Sorensen
8604cb5328
server: Fix DirectDownload certificate check initial delay (#7494)
This PR adjusts the DirectDownload certificate check initial delay. Since the time unit is in hours, I think it was a mistake to schedule the initial check to be in 60 hours after management servers start - the intention was likely 60 seconds. We had turned this feature on to run hourly, not realizing we would have to wait 2.5 days to see it first run!

Co-authored-by: Marcus Sorensen <mls@apple.com>
2023-05-08 12:09:50 +05:30
Marcus Sorensen
3cb4c801fb
server: fix null pointer on powerflex attach volume edge case (#7498)
This PR fixes a null pointer edge case where a PowerFlex volume is attached to a VM.

In this edge case, a VM has been created, started, stopped, and then reimaged. VM has a last host ID but the newly attached volume does not yet have a storage pool assigned, it will be assigned on the VM start. However, we assume that if the VM's host is not null, we need to try to revoke access to the volume for the host. Since there is no storage pool yet for the volume, we hit a null pointer when checking to see if the volume's pool is PowerFlex.

This was affecting all storage types, I could reproduce it with local storage, since the null pointer is at the check for pool's type.

Co-authored-by: Marcus Sorensen <mls@apple.com>
2023-05-08 12:07:41 +05:30
Marcus Sorensen
bdd5363314
Qemu migration hook: check for source length before using element 0 (#7482)
Co-authored-by: Marcus Sorensen <mls@apple.com>
2023-05-08 11:59:42 +05:30
Marcus Sorensen
cb0874f5b9
novnc: Send console text slower to avoid overloading remote keyboard buffer (#7477)
This PR slows down the console paste text function in the console ever so slightly, adding 25ms between each character. It was found that when large text is pasted, say an SSH key or something over 100 characters, it would stop somewhere in the 100-200 character range, and if the last character was capitalized it would be stuck with left shift held down.

In debugging, I ran noVNC locally with websockify against a Qemu VNC and took the whole console proxy out of the equation and was still able to reproduce it. I traced the websocket packets and we were clearly firing off all of the keypresses just fine, but the ones on the end were getting dropped VNC server side. It seems we are overloading a keyboard buffer, or something along those lines when we send all of the keypress messages at once. It was also observed that we were able to send off all of the messages via websocket in just a few ms but the typing on the guest side took a few seconds, so there is some buffering and processing going on and I think we are just hitting some limit in this.

This sendText function doesn't seem to exist in upstream noVNC, so just patching it here seems reasonable. I suspect we added this for feature parity with whatever noVNC replaced.

In testing it is now much more reliable in sending a few paragraphs of text, and not visibly slower than before, but obviously still too slow to do anything really big with it. It isn't really the goal to be able to paste full documents.

Co-authored-by: Marcus Sorensen <mls@apple.com>
2023-05-08 11:54:08 +05:30
Marcus Sorensen
ec0f8bddf6
Support local storage live migration for direct download templates (#7453)
Co-authored-by: Marcus Sorensen <mls@apple.com>
2023-05-04 17:37:58 -03:00
Abhishek Kumar
d147f1cc3b
ui: fix custom offering cpuspeed during vm import (#7423)
* ui: fix custom offering cpuspeed during import vm

Fixes #7420

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

* refactor

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

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-01 18:53:17 +05:30
Abhishek Kumar
b84744d9a5
server: validate ip address value on update config (#7415)
Fixes #6958

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-04-28 16:11:33 +05:30
dahn
8bbe2f7cb2
engine/schema: use junit 4 (same as the rest of the project tests) 2023-04-27 11:36:27 +02:00
Abhishek Kumar
e166f96094
ssvm: fix post request header case mismatch (#7445)
Fixes #7442

With d74f64a2e16 key for the host header was changed to lowercase which is causing host be null while processing upload in SSVM

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: João Jandre <48719461+JoaoJandre@users.noreply.github.com>
2023-04-25 16:00:21 +05:30
Abhishek Kumar
5885045873
refactor: delete unsed serviceoffering classes in quota module (#7439)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-04-20 15:18:17 +05:30
Abhishek Kumar
a5676b0d01 ui: syntax fix for build failure
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-04-19 12:47:20 +05:30
Abhishek Kumar
41bbedb530 Merge remote-tracking branch 'apache/4.17' into 4.18 2023-04-19 12:36:10 +05:30