[GitHub] [cloudstack] blueorangutan commented on pull request #7564: make NoopDbUpgrade do a systemvm template check

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7564:
URL: https://github.com/apache/cloudstack/pull/7564#issuecomment-1569165385

   [SF] Trillian test result (tid-6623)
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 43626 seconds
   Marvin logs: 
https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7564-t6623-kvm-centos7.zip
   Smoke tests completed. 108 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] JoaoJandre commented on pull request #7131: Normalize loggers and upgrade log4j 1.2 to log4j 2.19

2023-05-30 Thread via GitHub


JoaoJandre commented on PR #7131:
URL: https://github.com/apache/cloudstack/pull/7131#issuecomment-1568940404

   > @JoaoJandre `mbx` assumes you'll use packages with systemvmtemplates, 
which is by default as in all pkgs on http://download.cloudstack.org/ etc have 
them bundled in. If you're building custom packages with no systemvmtemplates 
then that's a specific case - I can add a note on mbx's README.
   > 
   > I'm using the latest mbx as from https://github.com/shapeblue/mbx there is 
no private fork/version that I'm using. I did a quick test against 4.19/main 
EL8 packages from latest main branch from today and they're deploying okay for 
me. I'm using mbx on a NUC9 i7 based mini-pc server with Ubuntu 22.04 + KVM. 
Btw, the mbx's smoketests.sh isn't fully optimized with test_data.py, so it 
doesn't pass all smoketests (yet) like BO/trillian does.
   
   I have made all my tests using el7, I'll try to reproduce them with el8, but 
it would also be good to see what BO outputs after the fix I mentioned earlier 
to daan is done.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] JoaoJandre commented on pull request #7131: Normalize loggers and upgrade log4j 1.2 to log4j 2.19

2023-05-30 Thread via GitHub


JoaoJandre commented on PR #7131:
URL: https://github.com/apache/cloudstack/pull/7131#issuecomment-1568939992

   > > Instead what I did was change where EncryptionCLI was called 
(cloud-setup-databases for example) to also pass the log4j2 jar files in the 
classpath. If you have a script that is calling the EncryptorCLI manually, you 
also have to pass the log4j2 jar path (which should be in the same directory as 
cloud-utils).
   > 
   > ok, make sure this ends up in documentation somewhere, please. I will most 
certainly not be the only one that runs into this ;)
   
   Sure, I've added it to the PR description for now  :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] JoaoJandre commented on pull request #7489: Flexible tags for hosts and storage pools

2023-05-30 Thread via GitHub


JoaoJandre commented on PR #7489:
URL: https://github.com/apache/cloudstack/pull/7489#issuecomment-1568781634

   > > Sounds interesting - as long as we keep the original behaviour a default 
(backward compatibility), I think this would be an interesting feature. It does 
add complexity (as with anything else), so proper documentation should be in 
place.
   > 
   > @JoaoJandre , can you reply this comment, please? As I read this the old 
behaviour is intact without change. But is there any risk that a user may think 
they use an old fashion tag but end up creating a dynamic one?
   
   Sure, as I stated on 
https://github.com/apache/cloudstack/pull/7489#issuecomment-1538269766, the 
current behavior is kept; therefore, the use of tag as rules is optional. Users 
have to explicitly inform the `isTagARule` parameter as true when calling the 
APIs to make the tags be interpreted as rules. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] yashi4engg commented on issue #7543: Host HA not working even after configured oob-management

2023-05-30 Thread via GitHub


yashi4engg commented on issue #7543:
URL: https://github.com/apache/cloudstack/issues/7543#issuecomment-1568687796

   @kiranchavala  I am trying to setup Host HA ... as of now i have 3 
hypervisors in cluster out of these on one hypervisor i configured OOB 
management and enabled Host HA ..But when host is going to power off or 
something else cluster is able to get power status and mark as power status off 
in UI but its not trying to bring this up or also not marking it disconnected 
in UI so VMs on hypervisor are keep on showing running but not migrating .Even 
VMs are marked HA enabled in template. 
   
   
   Our Requirement - 
   We want as soon as any hypervisor went down or crash ..VMs running on that 
hypervisor should migrate to other hypervisor by default. 
   
   Our config :- 
   OS - OEL9 
   OOB band mgmt - IPMI 
   H/w -  Dell R series servers   
   
   Steps to Reproduce - Power off hypervisor from IDrac 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #7532: Updated the code to access the primary color from config.json.

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #7532:
URL: https://github.com/apache/cloudstack/pull/7532#issuecomment-1568597322

   > @davidjumani and @utchoang worked last in that area. How can i request for 
a review?
   
   ok, these are not currently active on the project @shwstppr can you review?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] codecov[bot] commented on pull request #7570: interpret /etc/redhat-release better

2023-05-30 Thread via GitHub


codecov[bot] commented on PR #7570:
URL: https://github.com/apache/cloudstack/pull/7570#issuecomment-1568592064

   ## 
[Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/7570?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   > Merging 
[#7570](https://app.codecov.io/gh/apache/cloudstack/pull/7570?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 (704b8a2) into 
[4.18](https://app.codecov.io/gh/apache/cloudstack/commit/17e765e6bc938fa1023599147d600733d2bb0403?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 (17e765e) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   ```diff
   @@Coverage Diff@@
   ##   4.18#7570   +/-   ##
   =
 Coverage 12.97%   12.97%   
 Complexity 8964 8964   
   =
 Files  2716 2716   
 Lines256153   256153   
 Branches  3994839948   
   =
 Hits  3322633226   
 Misses   218767   218767   
 Partials   4160 4160   
   ```
   
   
   
   :mega: We’re building smart automated test selection to slash your CI/CD 
build times. [Learn 
more](https://about.codecov.io/iterative-testing/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #7570: interpret /etc/redhat-release better

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7570:
URL: https://github.com/apache/cloudstack/pull/7570#issuecomment-1568590775

   Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 
:heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. 
SL-JID 6176


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] ilhamalrahm commented on pull request #7532: Updated the code to access the primary color from config.json.

2023-05-30 Thread via GitHub


ilhamalrahm commented on PR #7532:
URL: https://github.com/apache/cloudstack/pull/7532#issuecomment-1568578114

   @davidjumani and @utchoang worked last in that area. How can i request for a 
review?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[cloudstack-go] branch main updated: Log apis missing in layout.go (#63)

2023-05-30 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-go.git


The following commit(s) were added to refs/heads/main by this push:
 new be2b1cd  Log apis missing in layout.go (#63)
be2b1cd is described below

commit be2b1cd16b8c299177a1b87844af8129061b8745
Author: Vishesh 
AuthorDate: Tue May 30 19:39:21 2023 +0530

Log apis missing in layout.go (#63)
---
 generate/generate.go | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/generate/generate.go b/generate/generate.go
index 3f693ec..8e823bc 100644
--- a/generate/generate.go
+++ b/generate/generate.go
@@ -2005,6 +2005,22 @@ func getUniqueTypeName(prefix, name string) (string, 
bool) {
return getUniqueTypeName(prefix, name+"Internal")
 }
 
+func logMissingApis(ai map[string]*API, as *allServices) {
+   asMap := make(map[string]*API)
+   for _, svc := range as.services {
+   for _, api := range svc.apis {
+   asMap[api.Name] = api
+   }
+   }
+
+   for apiName, _ := range ai {
+   _, found := asMap[apiName]
+   if !found {
+   log.Printf("Api missing in layout: %s", apiName)
+   }
+   }
+}
+
 func getAllServices(listApis string) (*allServices, []error, error) {
// Get a map with all API info
ai, err := getAPIInfo(listApis)
@@ -2036,6 +2052,8 @@ func getAllServices(listApis string) (*allServices, 
[]error, error) {
as.services = append(as.services, {name: "CustomService"})
sort.Sort(as.services)
 
+   logMissingApis(ai, as)
+
return as, errors, nil
 }
 



[GitHub] [cloudstack] DaanHoogland commented on pull request #7532: Updated the code to access the primary color from config.json.

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #7532:
URL: https://github.com/apache/cloudstack/pull/7532#issuecomment-1568503295

   > Is there anything else that i have to do?
   
   @ilhamalrahm , You need a second LGTM and test verification. Best is to look 
at `git blame` to see who else modified the code in that area and ask them for 
a review.
   It also help to fill the How was this tested section, so it will be easy for 
someone else to replicate.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7554: server,api,ui: host auto-select for migrateVirtualMachineWithVolume

2023-05-30 Thread via GitHub


DaanHoogland commented on code in PR #7554:
URL: https://github.com/apache/cloudstack/pull/7554#discussion_r1210325040


##
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java:
##
@@ -146,28 +152,31 @@ public ApiCommandResourceType getApiResourceType() {
 
 @Override
 public void execute() {
-if (hostId == null && MapUtils.isEmpty(migrateVolumeTo)) {
-throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed for migrating the VM.", ApiConstants.HOST_ID, 
ApiConstants.MIGRATE_TO));
+if (hostId == null && MapUtils.isEmpty(migrateVolumeTo) && 
!Boolean.TRUE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed or %s must be true for migrating the VM.", 
ApiConstants.HOST_ID, ApiConstants.MIGRATE_TO, ApiConstants.AUTO_SELECT));
 }
 
 VirtualMachine virtualMachine = 
_userVmService.getVm(getVirtualMachineId());
-if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
hostId != null) {
+if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
(hostId != null || Boolean.TRUE.equals(autoSelect))) {
 throw new InvalidParameterValueException(String.format("%s is not 
in the Running state to migrate it to the new host.", virtualMachine));
 }
 
-if (!VirtualMachine.State.Stopped.equals(virtualMachine.getState()) && 
hostId == null) {
-throw new InvalidParameterValueException(String.format("%s is not 
in the Stopped state to migrate, use the %s parameter to migrate it to a new 
host.",
-virtualMachine, ApiConstants.HOST_ID));
+if (!VirtualMachine.State.Stopped.equals(virtualMachine.getState()) && 
hostId == null && Boolean.FALSE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("%s is not 
in the Stopped state to migrate, use the %s or %s parameter to migrate it to a 
new host.",
+virtualMachine, 
ApiConstants.HOST_ID,ApiConstants.AUTO_SELECT));
 }
 
 try {
 VirtualMachine migratedVm = null;
-if (hostId != null) {
-Host destinationHost = _resourceService.getHost(getHostId());
-// OfflineVmwareMigration: destination host would have to not 
be a required parameter for stopped VMs
-if (destinationHost == null) {
-s_logger.error(String.format("Unable to find the host with 
ID [%s].", getHostId()));
-throw new InvalidParameterValueException("Unable to find 
the specified host to migrate the VM.");
+if (getHostId() != null || Boolean.TRUE.equals(autoSelect)) {
+Host destinationHost = null;
+if (getHostId() != null) {
+destinationHost = _resourceService.getHost(getHostId());
+// OfflineVmwareMigration: destination host would have to 
not be a required parameter for stopped VMs
+if (destinationHost == null) {
+s_logger.error(String.format("Unable to find the host 
with ID [%s].", getHostId()));
+throw new InvalidParameterValueException("Unable to 
find the specified host to migrate the VM.");
+}

Review Comment:
   ok, i see now what I missed. If we enter this block because 
`Boolean.TRUE.equals(autoSelect)` we do nothing and just pass a `null` to 
`migrateVirtualMachineWithVolume`. I think this would read easier if the block 
was extracted into a new method.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #7570: interpret /etc/redhet-release better

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7570:
URL: https://github.com/apache/cloudstack/pull/7570#issuecomment-1568481674

   @DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will 
be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you 
posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #7570: interpret /etc/redhet-release better

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #7570:
URL: https://github.com/apache/cloudstack/pull/7570#issuecomment-1568478414

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland opened a new pull request, #7570: interpret /etc/redhet-release better

2023-05-30 Thread via GitHub


DaanHoogland opened a new pull request, #7570:
URL: https://github.com/apache/cloudstack/pull/7570

   ### Description
   
   This PR fixes the way /etc/redhat-release is read to return host attributes
   
   
   
   
   
   
   
   
   Fixes: #7547
   
   
   
   
   
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
    Feature/Enhancement Scale
   
   - [ ] Major
   - [x] Minor
   
    Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [x] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   
   
   
   
   
   tested on a host manually by editting the /etc/redhat-release file and 
verifying different outputs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] ilhamalrahm commented on pull request #7532: Updated the code to access the primary color from config.json.

2023-05-30 Thread via GitHub


ilhamalrahm commented on PR #7532:
URL: https://github.com/apache/cloudstack/pull/7532#issuecomment-1568412643

   Is there anything else that i have to do?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] harikrishna-patnala commented on a diff in pull request #7381: Fix foreign key constraints and the mysql procedure that is used

2023-05-30 Thread via GitHub


harikrishna-patnala commented on code in PR #7381:
URL: https://github.com/apache/cloudstack/pull/7381#discussion_r1210131119


##
engine/schema/src/main/java/com/cloud/upgrade/dao/DatabaseAccessObject.java:
##
@@ -26,6 +26,17 @@ public class DatabaseAccessObject {
 
 private static Logger s_logger = 
Logger.getLogger(DatabaseAccessObject.class);
 
+public void addForeignKey(Connection conn, String tableName, String 
tableColumn, String foreignTableName, String foreignColumnName) {
+String addForeignKeyStmt = String.format("CALL 
`cloud`.`IDEMPOTENT_ADD_FOREIGN_KEY`('%s', '%s', '%s', '%s')", tableName, 
tableColumn, foreignTableName, foreignColumnName);

Review Comment:
   Agree with @weizhouapache it is happening because of the different error 
codes. 
   
   Sorry for the delay @shwstppr. I'm on this now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #7554: server,api,ui: host auto-select for migrateVirtualMachineWithVolume

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7554:
URL: https://github.com/apache/cloudstack/pull/7554#issuecomment-1568231701

   Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 
:heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. 
SL-JID 6175


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on a diff in pull request #7381: Fix foreign key constraints and the mysql procedure that is used

2023-05-30 Thread via GitHub


weizhouapache commented on code in PR #7381:
URL: https://github.com/apache/cloudstack/pull/7381#discussion_r1210088804


##
engine/schema/src/main/java/com/cloud/upgrade/dao/DatabaseAccessObject.java:
##
@@ -26,6 +26,17 @@ public class DatabaseAccessObject {
 
 private static Logger s_logger = 
Logger.getLogger(DatabaseAccessObject.class);
 
+public void addForeignKey(Connection conn, String tableName, String 
tableColumn, String foreignTableName, String foreignColumnName) {
+String addForeignKeyStmt = String.format("CALL 
`cloud`.`IDEMPOTENT_ADD_FOREIGN_KEY`('%s', '%s', '%s', '%s')", tableName, 
tableColumn, foreignTableName, foreignColumnName);

Review Comment:
   > I am not sure it is wise to allow changes to the DB to be not IdemPotent 
if they can be. updating in dot releases that rquire updates will lead to 
conflicts if we do not keep this policy. I have not understood yet why it would 
be harmful in this instance. @weizhouapache please explain.
   
   @DaanHoogland 
   the try-catch block will handle the exceptions if the column or constrain 
key has been already added.
   
   I think it is better than MySQL procedure, because the error codes of MySQL 
procedure are different with MySQL versions, which is the root cause of #7358 
   
   ```
   try
   {
   pstmt.executeUpdate();
   s_logger.debug(String.format("Foreign key is added successfully 
from the table %s", tableName));
   } catch (SQLException e) {
   s_logger.error("Ignored SQL Exception when trying to add foreign 
key on table "  + tableName + " exception: " + e.getMessage());
   }
   }
   }



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[cloudstack-cloudmonkey] branch main updated: Fix spelling (#136)

2023-05-30 Thread bstoyanov
This is an automated email from the ASF dual-hosted git repository.

bstoyanov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git


The following commit(s) were added to refs/heads/main by this push:
 new 23852c7  Fix spelling (#136)
23852c7 is described below

commit 23852c742ca8fe633a79e1758b881f3b234d3536
Author: John Bampton 
AuthorDate: Tue May 30 20:40:58 2023 +1000

Fix spelling (#136)
---
 CHANGES.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 57b5761..070febd 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -94,7 +94,7 @@ This release includes
 - Parameter completion uses list api heuristics and related APIs as fallback
 - Parameter completion options are cached to speed up rendering of options
 - CloudMonkey returns non-zero exit code when run on shell and a error is 
return
-  from managment server, the error message is written to stderr
+  from management server, the error message is written to stderr
 - Adds new config parameter 'verifysslcert' to enable/disable SSL cert checking
 - New command line arg: -d for display (json, table or default)
 
@@ -110,7 +110,7 @@ This release includes
  - Network requests, json decoding and shell related bugfixes
  - Based on platform, it will install either pyreadline (Windows) or readline 
(OSX and Linux)
  - Config options `protocol`, `host`, `port`, `path` are deprecated now
- - Backward compatibilty exists for above options but we use `url` for the 
mgmt server URL
+ - Backward compatibility exists for above options but we use `url` for the 
mgmt server URL
  - Introduces server profiles so users can use cloudmonkey with different 
hosts and management server configs
  - A default profile under the section [local] is added with default values
  - Everytime `set` is called, cloudmonkey will write the config and reload 
config file



[GitHub] [cloudstack] shwstppr commented on a diff in pull request #7554: server,api,ui: host auto-select for migrateVirtualMachineWithVolume

2023-05-30 Thread via GitHub


shwstppr commented on code in PR #7554:
URL: https://github.com/apache/cloudstack/pull/7554#discussion_r1210065646


##
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java:
##
@@ -146,28 +152,31 @@ public ApiCommandResourceType getApiResourceType() {
 
 @Override
 public void execute() {
-if (hostId == null && MapUtils.isEmpty(migrateVolumeTo)) {
-throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed for migrating the VM.", ApiConstants.HOST_ID, 
ApiConstants.MIGRATE_TO));
+if (hostId == null && MapUtils.isEmpty(migrateVolumeTo) && 
!Boolean.TRUE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed or %s must be true for migrating the VM.", 
ApiConstants.HOST_ID, ApiConstants.MIGRATE_TO, ApiConstants.AUTO_SELECT));
 }
 
 VirtualMachine virtualMachine = 
_userVmService.getVm(getVirtualMachineId());
-if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
hostId != null) {
+if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
(hostId != null || Boolean.TRUE.equals(autoSelect))) {
 throw new InvalidParameterValueException(String.format("%s is not 
in the Running state to migrate it to the new host.", virtualMachine));
 }
 
-if (!VirtualMachine.State.Stopped.equals(virtualMachine.getState()) && 
hostId == null) {
-throw new InvalidParameterValueException(String.format("%s is not 
in the Stopped state to migrate, use the %s parameter to migrate it to a new 
host.",
-virtualMachine, ApiConstants.HOST_ID));
+if (!VirtualMachine.State.Stopped.equals(virtualMachine.getState()) && 
hostId == null && Boolean.FALSE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("%s is not 
in the Stopped state to migrate, use the %s or %s parameter to migrate it to a 
new host.",
+virtualMachine, 
ApiConstants.HOST_ID,ApiConstants.AUTO_SELECT));
 }
 
 try {
 VirtualMachine migratedVm = null;
-if (hostId != null) {
-Host destinationHost = _resourceService.getHost(getHostId());
-// OfflineVmwareMigration: destination host would have to not 
be a required parameter for stopped VMs
-if (destinationHost == null) {
-s_logger.error(String.format("Unable to find the host with 
ID [%s].", getHostId()));
-throw new InvalidParameterValueException("Unable to find 
the specified host to migrate the VM.");
+if (getHostId() != null || Boolean.TRUE.equals(autoSelect)) {
+Host destinationHost = null;
+if (getHostId() != null) {
+destinationHost = _resourceService.getHost(getHostId());
+// OfflineVmwareMigration: destination host would have to 
not be a required parameter for stopped VMs
+if (destinationHost == null) {
+s_logger.error(String.format("Unable to find the host 
with ID [%s].", getHostId()));
+throw new InvalidParameterValueException("Unable to 
find the specified host to migrate the VM.");
+}

Review Comment:
   @DaanHoogland no, not the same. If either hostid is provided or autoselect 
is true then the code tries to do migration with 
UserVmService.migrateVirtualMachineWithVolume else it uses 
UserVmService.vmStorageMigration



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7554: server,api,ui: host auto-select for migrateVirtualMachineWithVolume

2023-05-30 Thread via GitHub


DaanHoogland commented on code in PR #7554:
URL: https://github.com/apache/cloudstack/pull/7554#discussion_r1210061088


##
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java:
##
@@ -146,28 +152,31 @@ public ApiCommandResourceType getApiResourceType() {
 
 @Override
 public void execute() {
-if (hostId == null && MapUtils.isEmpty(migrateVolumeTo)) {
-throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed for migrating the VM.", ApiConstants.HOST_ID, 
ApiConstants.MIGRATE_TO));
+if (hostId == null && MapUtils.isEmpty(migrateVolumeTo) && 
!Boolean.TRUE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed or %s must be true for migrating the VM.", 
ApiConstants.HOST_ID, ApiConstants.MIGRATE_TO, ApiConstants.AUTO_SELECT));
 }
 
 VirtualMachine virtualMachine = 
_userVmService.getVm(getVirtualMachineId());
-if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
hostId != null) {
+if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
(hostId != null || Boolean.TRUE.equals(autoSelect))) {
 throw new InvalidParameterValueException(String.format("%s is not 
in the Running state to migrate it to the new host.", virtualMachine));
 }
 
-if (!VirtualMachine.State.Stopped.equals(virtualMachine.getState()) && 
hostId == null) {
-throw new InvalidParameterValueException(String.format("%s is not 
in the Stopped state to migrate, use the %s parameter to migrate it to a new 
host.",
-virtualMachine, ApiConstants.HOST_ID));
+if (!VirtualMachine.State.Stopped.equals(virtualMachine.getState()) && 
hostId == null && Boolean.FALSE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("%s is not 
in the Stopped state to migrate, use the %s or %s parameter to migrate it to a 
new host.",
+virtualMachine, 
ApiConstants.HOST_ID,ApiConstants.AUTO_SELECT));
 }
 
 try {
 VirtualMachine migratedVm = null;
-if (hostId != null) {
-Host destinationHost = _resourceService.getHost(getHostId());
-// OfflineVmwareMigration: destination host would have to not 
be a required parameter for stopped VMs
-if (destinationHost == null) {
-s_logger.error(String.format("Unable to find the host with 
ID [%s].", getHostId()));
-throw new InvalidParameterValueException("Unable to find 
the specified host to migrate the VM.");
+if (getHostId() != null || Boolean.TRUE.equals(autoSelect)) {
+Host destinationHost = null;
+if (getHostId() != null) {
+destinationHost = _resourceService.getHost(getHostId());
+// OfflineVmwareMigration: destination host would have to 
not be a required parameter for stopped VMs
+if (destinationHost == null) {
+s_logger.error(String.format("Unable to find the host 
with ID [%s].", getHostId()));
+throw new InvalidParameterValueException("Unable to 
find the specified host to migrate the VM.");
+}

Review Comment:
   @shwstppr , isn´t this equivilent?  This is a genuine question. I do not see 
how `autoSelect is used in this bit
   ```suggestion
   if (getHostId() != null) {
   Host destinationHost = _resourceService.getHost(getHostId());
   // OfflineVmwareMigration: destination host would have to 
not be a required parameter for stopped VMs
   if (destinationHost == null && 
Boolean.FALSE.equals(autoSelect)) {
   s_logger.error(String.format("Unable to find the host 
with ID [%s].", getHostId()));
   throw new InvalidParameterValueException("Unable to find 
the specified host to migrate the VM.");
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #7554: server,api,ui: host auto-select for migrateVirtualMachineWithVolume

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7554:
URL: https://github.com/apache/cloudstack/pull/7554#issuecomment-1568149938

   @shwstppr a [SF] Jenkins job has been kicked to build packages. It will be 
bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you 
posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on a diff in pull request #7554: server,api,ui: host auto-select for migrateVirtualMachineWithVolume

2023-05-30 Thread via GitHub


shwstppr commented on code in PR #7554:
URL: https://github.com/apache/cloudstack/pull/7554#discussion_r1210037400


##
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##
@@ -6942,8 +6957,9 @@ public VirtualMachine 
migrateVirtualMachineWithVolume(Long vmId, Host destinatio
 Pair sourceDestinationHosts = 
getHostsForMigrateVmWithStorage(vm, destinationHost);
 Host srcHost = sourceDestinationHosts.first();
 
-if (!isVMUsingLocalStorage(vm) && MapUtils.isEmpty(volumeToPool)
-&& 
(destinationHost.getClusterId().equals(srcHost.getClusterId()) || 
isVmVolumesOnZoneWideStore(vm))){
+final List volumes = 
_volsDao.findCreatedByInstance(vm.getId());
+if (!isAnyVmVolumeUsingLocalStorage(volumes) && 
MapUtils.isEmpty(volumeToPool) && destinationHost != null
+&& 
(destinationHost.getClusterId().equals(srcHost.getClusterId()) || 
isAllVmVolumesOnZoneWideStore(volumes))) {

Review Comment:
   Done



##
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java:
##
@@ -146,28 +152,31 @@ public ApiCommandResourceType getApiResourceType() {
 
 @Override
 public void execute() {
-if (hostId == null && MapUtils.isEmpty(migrateVolumeTo)) {
-throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed for migrating the VM.", ApiConstants.HOST_ID, 
ApiConstants.MIGRATE_TO));
+if (hostId == null && MapUtils.isEmpty(migrateVolumeTo) && 
!Boolean.TRUE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed or %s must be true for migrating the VM.", 
ApiConstants.HOST_ID, ApiConstants.MIGRATE_TO, ApiConstants.AUTO_SELECT));
 }
 
 VirtualMachine virtualMachine = 
_userVmService.getVm(getVirtualMachineId());
-if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
hostId != null) {
+if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
(hostId != null || Boolean.TRUE.equals(autoSelect))) {
 throw new InvalidParameterValueException(String.format("%s is not 
in the Running state to migrate it to the new host.", virtualMachine));
 }
 
-if (!VirtualMachine.State.Stopped.equals(virtualMachine.getState()) && 
hostId == null) {
-throw new InvalidParameterValueException(String.format("%s is not 
in the Stopped state to migrate, use the %s parameter to migrate it to a new 
host.",
-virtualMachine, ApiConstants.HOST_ID));
+if (!VirtualMachine.State.Stopped.equals(virtualMachine.getState()) && 
hostId == null && Boolean.FALSE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("%s is not 
in the Stopped state to migrate, use the %s or %s parameter to migrate it to a 
new host.",
+virtualMachine, 
ApiConstants.HOST_ID,ApiConstants.AUTO_SELECT));
 }
 
 try {
 VirtualMachine migratedVm = null;
-if (hostId != null) {
-Host destinationHost = _resourceService.getHost(getHostId());
-// OfflineVmwareMigration: destination host would have to not 
be a required parameter for stopped VMs
-if (destinationHost == null) {
-s_logger.error(String.format("Unable to find the host with 
ID [%s].", getHostId()));
-throw new InvalidParameterValueException("Unable to find 
the specified host to migrate the VM.");
+if (getHostId() != null || Boolean.TRUE.equals(autoSelect)) {
+Host destinationHost = null;
+if (!Boolean.TRUE.equals(autoSelect)) {

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #7554: server,api,ui: host auto-select for migrateVirtualMachineWithVolume

2023-05-30 Thread via GitHub


shwstppr commented on PR #7554:
URL: https://github.com/apache/cloudstack/pull/7554#issuecomment-1568147558

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on a diff in pull request #7554: server,api,ui: host auto-select for migrateVirtualMachineWithVolume

2023-05-30 Thread via GitHub


shwstppr commented on code in PR #7554:
URL: https://github.com/apache/cloudstack/pull/7554#discussion_r1210036378


##
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java:
##
@@ -146,28 +152,31 @@ public ApiCommandResourceType getApiResourceType() {
 
 @Override
 public void execute() {
-if (hostId == null && MapUtils.isEmpty(migrateVolumeTo)) {
-throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed for migrating the VM.", ApiConstants.HOST_ID, 
ApiConstants.MIGRATE_TO));
+if (hostId == null && MapUtils.isEmpty(migrateVolumeTo) && 
!Boolean.TRUE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed or %s must be true for migrating the VM.", 
ApiConstants.HOST_ID, ApiConstants.MIGRATE_TO, ApiConstants.AUTO_SELECT));
 }
 
 VirtualMachine virtualMachine = 
_userVmService.getVm(getVirtualMachineId());
-if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
hostId != null) {
+if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
(hostId != null || Boolean.TRUE.equals(autoSelect))) {
 throw new InvalidParameterValueException(String.format("%s is not 
in the Running state to migrate it to the new host.", virtualMachine));

Review Comment:
   Leaving this as it can be addressed separately



##
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java:
##
@@ -146,28 +152,31 @@ public ApiCommandResourceType getApiResourceType() {
 
 @Override
 public void execute() {
-if (hostId == null && MapUtils.isEmpty(migrateVolumeTo)) {
-throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed for migrating the VM.", ApiConstants.HOST_ID, 
ApiConstants.MIGRATE_TO));
+if (hostId == null && MapUtils.isEmpty(migrateVolumeTo) && 
!Boolean.TRUE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed or %s must be true for migrating the VM.", 
ApiConstants.HOST_ID, ApiConstants.MIGRATE_TO, ApiConstants.AUTO_SELECT));
 }
 
 VirtualMachine virtualMachine = 
_userVmService.getVm(getVirtualMachineId());
-if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
hostId != null) {
+if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
(hostId != null || Boolean.TRUE.equals(autoSelect))) {
 throw new InvalidParameterValueException(String.format("%s is not 
in the Running state to migrate it to the new host.", virtualMachine));
 }
 
-if (!VirtualMachine.State.Stopped.equals(virtualMachine.getState()) && 
hostId == null) {
-throw new InvalidParameterValueException(String.format("%s is not 
in the Stopped state to migrate, use the %s parameter to migrate it to a new 
host.",
-virtualMachine, ApiConstants.HOST_ID));
+if (!VirtualMachine.State.Stopped.equals(virtualMachine.getState()) && 
hostId == null && Boolean.FALSE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("%s is not 
in the Stopped state to migrate, use the %s or %s parameter to migrate it to a 
new host.",

Review Comment:
   Leaving this as it can be addressed separately



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[cloudstack] branch 4.18 updated (f6365801953 -> 17e765e6bc9)

2023-05-30 Thread dahn
This is an automated email from the ASF dual-hosted git repository.

dahn pushed a change to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


from f6365801953 cks,ui: allow changing stopped cluster offering, 
improvements (#7475)
 add 17e765e6bc9 test: reduce PowerMock usage for code coverage (#7452)

No new revisions were added by this update.

Summary of changes:
 .../command/user/network/CreateNetworkCmdTest.java | 54 +-
 .../command/user/network/UpdateNetworkCmdTest.java | 38 ++-
 .../NonStrictHostAffinityProcessorTest.java| 35 +++---
 3 files changed, 88 insertions(+), 39 deletions(-)



[cloudstack-www] branch docusaurus-staging updated (044369c6 -> 5594adc8)

2023-05-30 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a change to branch docusaurus-staging
in repository https://gitbox.apache.org/repos/asf/cloudstack-www.git


from 044369c6 use different config for blog
 add 5594adc8 new blog: Apiculus

No new revisions were added by this update.

Summary of changes:
 blog/2023-05-30-apiculus/apiculus.png | Bin 0 -> 90016 bytes
 blog/2023-05-30-apiculus/index.md |  66 ++
 blog/2023-05-30-apiculus/kshitish.png | Bin 0 -> 61313 bytes
 static/files/apiculus-case-study-2023.pdf | Bin 0 -> 1250348 bytes
 4 files changed, 66 insertions(+)
 create mode 100644 blog/2023-05-30-apiculus/apiculus.png
 create mode 100644 blog/2023-05-30-apiculus/index.md
 create mode 100644 blog/2023-05-30-apiculus/kshitish.png
 create mode 100644 static/files/apiculus-case-study-2023.pdf



[GitHub] [cloudstack] DaanHoogland closed pull request #7564: make NoopDbUpgrade do a systemvm template check

2023-05-30 Thread via GitHub


DaanHoogland closed pull request #7564: make NoopDbUpgrade do a systemvm 
template check
URL: https://github.com/apache/cloudstack/pull/7564


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #7452: test: reduce PowerMock usage for code coverage

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7452:
URL: https://github.com/apache/cloudstack/pull/7452#issuecomment-1568113337

   Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 
:heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. 
SL-JID 6174


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #7564: make NoopDbUpgrade do a systemvm template check

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7564:
URL: https://github.com/apache/cloudstack/pull/7564#issuecomment-1568104989

   @DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) 
has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #7564: make NoopDbUpgrade do a systemvm template check

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #7564:
URL: https://github.com/apache/cloudstack/pull/7564#issuecomment-1568103719

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7554: server,api,ui: host auto-select for migrateVirtualMachineWithVolume

2023-05-30 Thread via GitHub


DaanHoogland commented on code in PR #7554:
URL: https://github.com/apache/cloudstack/pull/7554#discussion_r1209969429


##
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java:
##
@@ -146,28 +152,31 @@ public ApiCommandResourceType getApiResourceType() {
 
 @Override
 public void execute() {
-if (hostId == null && MapUtils.isEmpty(migrateVolumeTo)) {
-throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed for migrating the VM.", ApiConstants.HOST_ID, 
ApiConstants.MIGRATE_TO));
+if (hostId == null && MapUtils.isEmpty(migrateVolumeTo) && 
!Boolean.TRUE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed or %s must be true for migrating the VM.", 
ApiConstants.HOST_ID, ApiConstants.MIGRATE_TO, ApiConstants.AUTO_SELECT));
 }
 
 VirtualMachine virtualMachine = 
_userVmService.getVm(getVirtualMachineId());
-if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
hostId != null) {
+if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
(hostId != null || Boolean.TRUE.equals(autoSelect))) {
 throw new InvalidParameterValueException(String.format("%s is not 
in the Running state to migrate it to the new host.", virtualMachine));

Review Comment:
   not in scope, but I think this meesage is misleading a bit:
   ```suggestion
   throw new InvalidParameterValueException(String.format("%s is 
not in the Running state. It must be running to migrate to a new host.", 
virtualMachine));
   ```



##
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java:
##
@@ -146,28 +152,31 @@ public ApiCommandResourceType getApiResourceType() {
 
 @Override
 public void execute() {
-if (hostId == null && MapUtils.isEmpty(migrateVolumeTo)) {
-throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed for migrating the VM.", ApiConstants.HOST_ID, 
ApiConstants.MIGRATE_TO));
+if (hostId == null && MapUtils.isEmpty(migrateVolumeTo) && 
!Boolean.TRUE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("Either %s 
or %s must be passed or %s must be true for migrating the VM.", 
ApiConstants.HOST_ID, ApiConstants.MIGRATE_TO, ApiConstants.AUTO_SELECT));
 }
 
 VirtualMachine virtualMachine = 
_userVmService.getVm(getVirtualMachineId());
-if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
hostId != null) {
+if (!VirtualMachine.State.Running.equals(virtualMachine.getState()) && 
(hostId != null || Boolean.TRUE.equals(autoSelect))) {
 throw new InvalidParameterValueException(String.format("%s is not 
in the Running state to migrate it to the new host.", virtualMachine));
 }
 
-if (!VirtualMachine.State.Stopped.equals(virtualMachine.getState()) && 
hostId == null) {
-throw new InvalidParameterValueException(String.format("%s is not 
in the Stopped state to migrate, use the %s parameter to migrate it to a new 
host.",
-virtualMachine, ApiConstants.HOST_ID));
+if (!VirtualMachine.State.Stopped.equals(virtualMachine.getState()) && 
hostId == null && Boolean.FALSE.equals(autoSelect)) {
+throw new InvalidParameterValueException(String.format("%s is not 
in the Stopped state to migrate, use the %s or %s parameter to migrate it to a 
new host.",
+virtualMachine, 
ApiConstants.HOST_ID,ApiConstants.AUTO_SELECT));
 }
 
 try {
 VirtualMachine migratedVm = null;
-if (hostId != null) {
-Host destinationHost = _resourceService.getHost(getHostId());
-// OfflineVmwareMigration: destination host would have to not 
be a required parameter for stopped VMs
-if (destinationHost == null) {
-s_logger.error(String.format("Unable to find the host with 
ID [%s].", getHostId()));
-throw new InvalidParameterValueException("Unable to find 
the specified host to migrate the VM.");
+if (getHostId() != null || Boolean.TRUE.equals(autoSelect)) {
+Host destinationHost = null;
+if (!Boolean.TRUE.equals(autoSelect)) {

Review Comment:
   this is actually an implicit null check on gethostId(), maybe we can make it 
more explicit for readability:
   ```suggestion
   if (getHostId() != null) {
   ```
   or 
   ```suggestion
   if (Boolean.FALSE.equals(autoSelect)) {
   ```
   in the end it seems we only care about the host id not being null in this 
block. so maybe remove both the checks on `autoSelect` completely from this 
block?



##

[GitHub] [cloudstack] blueorangutan commented on pull request #7564: make NoopDbUpgrade do a systemvm template check

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7564:
URL: https://github.com/apache/cloudstack/pull/7564#issuecomment-1568044732

   Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 
:heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. 
SL-JID 6173


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #6918: Override vr service offering

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #6918:
URL: https://github.com/apache/cloudstack/pull/6918#issuecomment-1568034721

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #7554: server,api,ui: host auto-select for migrateVirtualMachineWithVolume

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #7554:
URL: https://github.com/apache/cloudstack/pull/7554#issuecomment-1568019473

   @shwstppr do you need eyes on this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #7452: test: reduce PowerMock usage for code coverage

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7452:
URL: https://github.com/apache/cloudstack/pull/7452#issuecomment-1568005845

   @DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will 
be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you 
posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] harikrishna-patnala commented on issue #7569: L2 Network Created By Root user, Assigned To Specific Domain, Permissions not updated

2023-05-30 Thread via GitHub


harikrishna-patnala commented on issue #7569:
URL: https://github.com/apache/cloudstack/issues/7569#issuecomment-1568004170

   #7387 did not fix anything but made the tooltips more clear. I'll check the 
current issue here.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7381: Fix foreign key constraints and the mysql procedure that is used

2023-05-30 Thread via GitHub


DaanHoogland commented on code in PR #7381:
URL: https://github.com/apache/cloudstack/pull/7381#discussion_r1209923317


##
engine/schema/src/main/java/com/cloud/upgrade/dao/DatabaseAccessObject.java:
##
@@ -26,6 +26,17 @@ public class DatabaseAccessObject {
 
 private static Logger s_logger = 
Logger.getLogger(DatabaseAccessObject.class);
 
+public void addForeignKey(Connection conn, String tableName, String 
tableColumn, String foreignTableName, String foreignColumnName) {
+String addForeignKeyStmt = String.format("CALL 
`cloud`.`IDEMPOTENT_ADD_FOREIGN_KEY`('%s', '%s', '%s', '%s')", tableName, 
tableColumn, foreignTableName, foreignColumnName);

Review Comment:
   I am not sure it is wise to allow changes to the DB to be not IdemPotent if 
they can be. updating in dot releases that rquire updates will lead to 
conflicts if we do not keep this policy. I have not understood yet why it would 
be harmful in this instance. @weizhouapache please explain. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] thorzinaung commented on issue #7567: Unable to create vm from uploaded ISO in cloudstack

2023-05-30 Thread via GitHub


thorzinaung commented on issue #7567:
URL: https://github.com/apache/cloudstack/issues/7567#issuecomment-1567974603

   @kiranchavala hi, yes, i choose small, medium, large. all size but still 
same issue. as you can see in below picture. i can create vm from default 
centos template but cannot from uploaded ISO.
   https://github.com/apache/cloudstack/assets/122773216/9b56a0e5-68d9-4e25-9ef9-0d923d0fd811;>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #7313: server: improve storage GC to skip expunging possible duplicate volumes

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7313:
URL: https://github.com/apache/cloudstack/pull/7313#issuecomment-1567958660

   @DaanHoogland a [SF] Trillian-Jenkins matrix job (centos7 mgmt + 
xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been 
kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #7313: server: improve storage GC to skip expunging possible duplicate volumes

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #7313:
URL: https://github.com/apache/cloudstack/pull/7313#issuecomment-1567956728

   @blueorangutan test matrix


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6918: Override vr service offering

2023-05-30 Thread via GitHub


blueorangutan commented on PR #6918:
URL: https://github.com/apache/cloudstack/pull/6918#issuecomment-1567955680

   @DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) 
has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #6918: Override vr service offering

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #6918:
URL: https://github.com/apache/cloudstack/pull/6918#issuecomment-1567952173

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #6892: Externalize KVM HA heartbeat frequency

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #6892:
URL: https://github.com/apache/cloudstack/pull/6892#issuecomment-1567950200

   @weizhouapache I marked this for 4.19 as it is based of of main. You think 
it could go into 4.18.1?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #6892: Externalize KVM HA heartbeat frequency

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #6892:
URL: https://github.com/apache/cloudstack/pull/6892#issuecomment-1567949352

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #7403: api,server,ui: vr,systemvm in public ip response

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7403:
URL: https://github.com/apache/cloudstack/pull/7403#issuecomment-1567949315

   @DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) 
has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #7403: api,server,ui: vr,systemvm in public ip response

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #7403:
URL: https://github.com/apache/cloudstack/pull/7403#issuecomment-1567947845

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #7564: make NoopDbUpgrade do a systemvm template check

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7564:
URL: https://github.com/apache/cloudstack/pull/7564#issuecomment-1567946475

   @DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will 
be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you 
posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #7564: make NoopDbUpgrade do a systemvm template check

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #7564:
URL: https://github.com/apache/cloudstack/pull/7564#issuecomment-1567946183

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #6809: Reserve memory for host

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #6809:
URL: https://github.com/apache/cloudstack/pull/6809#issuecomment-1567944751

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #7298: request a helm chart, perhaps one for a small setup and one for an ha setup

2023-05-30 Thread via GitHub


DaanHoogland commented on issue #7298:
URL: https://github.com/apache/cloudstack/issues/7298#issuecomment-1567942724

   No @lknite you can but you are not supposed to install on a xenserver. If 
you do so it should be in a virtual machine and not on the dom0 . Your OS for 
the management server should be one of the supported OSses.
   
   I do think you are going about this wrong though. You should not expect 
cloudstack to run on top of k8s but vice versa. ACS is supposed to manage you 
Xens for you and deploy the k8s clusters on them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #7489: Flexible tags for hosts and storage pools

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #7489:
URL: https://github.com/apache/cloudstack/pull/7489#issuecomment-1567937828

   > Sounds interesting - as long as we keep the original behaviour a default 
(backward compatibility), I think this would be an interesting feature. It does 
add complexity (as with anything else), so proper documentation should be in 
place.
   
   @JoaoJandre , can you reply this comment, please? As I read this the old 
behaviour is intact without change. But is there any risk that a user may think 
they use an old fashion tag but end up creating a dynamic one?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #7515: Feature: Add unmanaged kubernetes cluster

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7515:
URL: https://github.com/apache/cloudstack/pull/7515#issuecomment-1567932698

   @weizhouapache a [LL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) 
has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on pull request #7515: Feature: Add unmanaged kubernetes cluster

2023-05-30 Thread via GitHub


weizhouapache commented on PR #7515:
URL: https://github.com/apache/cloudstack/pull/7515#issuecomment-1567930975

   @blueorangutan LLtest


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #7131: Normalize loggers and upgrade log4j 1.2 to log4j 2.19

2023-05-30 Thread via GitHub


DaanHoogland commented on PR #7131:
URL: https://github.com/apache/cloudstack/pull/7131#issuecomment-1567918479

   > Instead what I did was change where EncryptionCLI was called 
(cloud-setup-databases for example) to also pass the log4j2 jar files in the 
classpath. If you have a script that is calling the EncryptorCLI manually, you 
also have to pass the log4j2 jar path (which should be in the same directory as 
cloud-utils).
   
   ok, make sure this ends up in documentation somewhere, please. I will most 
certainly not be the only one that runs into this ;)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] hpepper commented on issue #7533: Cloudstack 4.18 HTTP 503 Error on Ubuntu 22.04

2023-05-30 Thread via GitHub


hpepper commented on issue #7533:
URL: https://github.com/apache/cloudstack/issues/7533#issuecomment-1567878654

   @weizhouapache thank you :-) that worked.
   (my brain apparently filtered out the 1. ( wonder where I introduced that, 
I'll run a new installation to ensure I can repeat this)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] thorzinaung commented on issue #7567: Unable to create vm from uploaded ISO in cloudstack

2023-05-30 Thread via GitHub


thorzinaung commented on issue #7567:
URL: https://github.com/apache/cloudstack/issues/7567#issuecomment-1567851565

   @kiranchavala not only it’s not working from opensuse but also for other 
distros. I can create vm from default centos7 template but I can’t create vm 
from uploaded ISO. It’s working before and now it’s not working. I have no 
clue. Could you pls suggest anything?
   
   Get Outlook for iOS
   
   From: kiranchavala ***@***.***>
   Sent: Tuesday, May 30, 2023 12:52:35 PM
   To: apache/cloudstack ***@***.***>
   Cc: thorzinaung ***@***.***>; Mention ***@***.***>
   Subject: Re: [apache/cloudstack] Unable to create vm from uploaded ISO in 
cloudstack (Issue #7567)
   
   
   @thorzinaung
   
   That's strange, Could you provide the iso link for open-suse (15.4) which 
you are using
   
   I used this link and it was working fine from Cloudstack
   
   
https://download.opensuse.org/distribution/leap/15.4/iso/openSUSE-Leap-15.4-DVD-x86_64-Media.iso
   
   —
   Reply to this email directly, view it on 
GitHub,
 or 
unsubscribe.
   You are receiving this because you were mentioned.Message ID: ***@***.***>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #7397: Feature: VM Scheduler

2023-05-30 Thread via GitHub


blueorangutan commented on PR #7397:
URL: https://github.com/apache/cloudstack/pull/7397#issuecomment-1567850256

   Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 
:heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. 
SL-JID 6172


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org