You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "JoaoJandre (via GitHub)" <gi...@apache.org> on 2023/04/18 20:01:54 UTC
[GitHub] [cloudstack] JoaoJandre opened a new pull request, #7446: Move subdomains between domains
JoaoJandre opened a new pull request, #7446:
URL: https://github.com/apache/cloudstack/pull/7446
### Description
Sometimes users have the need to move resources between domains, for example, in a big company, a department may be moved from one part of the company to another, changing the company's department hierarchy, the easiest way of reflecting this change on the company's cloud environment would be to move subdomains between domains, but currently ACS offers no option to do that.
This PR adds the `moveDomain` API, which will move domains between subdomains. Furthermore, if the domain that is being moved has any subdomains, those will also be moved, maintaining the current subdomain tree.
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [X] New feature (non-breaking change which adds functionality)
- [ ] 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
- [ ] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
## Description of tests
| Test | Result |
| ------ | ------ |
| Move an Inactive Domain | Error, as an inactive domain should not be able to be moved |
| Move a Domain to a new inactive parent domain | Error, as a domain that is inactive should not receive any new children|
| Move a domain to a new parent domain that has a child with the same name as the domain to be moved | Error, as two subdomains of the same domain should not have the same name |
| Move Domain ROOT | Error, root domain by definition must always be the father of all other domains|
| Move a domain that is already on the destination | Error, as it is already is were it should be |
| Move a domain to itself (moved domain = new parent domain) | Error, as this makes no sense |
| Move a domain that uses a shared network that is inaccessible to the new parent domain | Error, as the new parent domain must have access to all of its children's resources |
| Move a domain that has a child subdomain that uses a shared network that is inaccessible to the new parent domain | Error, as the new parent domain must have access to all of its children's resources |
| Move a domain that uses a affinity group that is inaccessible to the new parent domain | Error, as the new parent domain must have access to all of its children's resources |
| Move a domain that has a child subdomain that uses a affinity group that is inaccessible to the new parent domain | Error, as the new parent domain must have access to all of its children's resources|
| Move a domain that owns a shared network | Success |
| Move a domain that has a subdomain that owns a shared network | Success |
| Move a domain that uses a shared network that is accessible to the new parent domain | Success |
| Move a domain that has a subdomain that uses a shared network that is accessible to the new parent domain | Success |
| Move a domain that owns an affinity group | Success |
| Move a domain that has a subdomain that owns an affinity group | Success |
| Move a domain that uses a affinity group that is accessible to the new parent domain | Success |
| Move a domain that has a subdomain that uses a affinity group that is accessible to the new parent domain | Success |
| Move a domain that exceeds the resource limits of the new parent domain | Success |
All tests performed as expected. In the case of shared networks, all had subdomain access.
For successful cases, it was checked whether the following attributes of the moved domain and its children were correctly changed:
- Path
- Level
- Use of resources
- Limits
- Parent domain
In addition, it was verified that the number of children of the current parent domain and the target domain were correctly accounted for.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1820981719
> @JoaoJandre any update on this?
I've addressed some issues already, but some are a bit more complex. I'm working on it.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1787505587
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 7583
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7446: Move subdomains between domains
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1671860844
@JoaoJandre 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1830731658
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1831264133
@shwstppr a [SL] 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr merged PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7446: Move subdomains between domains
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1672664400
@rohityadavcloud @JoaoJandre was this extra consideration of quota limits addressed here?
> > Thanks for the PR @JoaoJandre interesting use-case. Do you think there should also be some kind of domain-limits check (for ex. moving sub-domain1 to a new parent could mean different limits on vms, volume, cpu, templates, storage etc. need to be recalculated/checked)? Also side-effects in (already produced) usage data and networks?
>
> Hey @rohityadavcloud, thanks for the suggestion, I actually agree with you, there should be some kind of domain-limits check. I will put this in draft until I have the time to add this check.
>
> About the side-effects in usage data, there shouldn't be any, as the usage data only uses the domain ID, and that is not changed when the domain is moved, only the domain path is changed. About networks, we already validate shared networks before moving the domain, what other side-effects could be an issue with networks?
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1831263208
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#discussion_r1410871604
##########
engine/schema/src/main/java/com/cloud/network/dao/NetworkDomainDaoImpl.java:
##########
@@ -71,4 +92,34 @@ public List<Long> listNetworkIdsByDomain(long domainId) {
}
return networkIdsToReturn;
}
+
+ @Override
+ public Map<Long, List<String>> listDomainsOfSharedNetworksUsedByDomainPath(String domainPath) {
+ logger.debug(String.format("Retrieving the domains of the shared networks with subdomain access used by domain with path [%s].", domainPath));
+
+ TransactionLegacy txn = TransactionLegacy.currentTxn();
+ try (PreparedStatement pstmt = txn.prepareStatement(LIST_DOMAINS_OF_SHARED_NETWORKS_USED_BY_DOMAIN_PATH)) {
+ Map<Long, List<String>> domainsOfSharedNetworksUsedByDomainPath = new HashMap<>();
+
+ String domainSearch = domainPath.concat("%");
+ pstmt.setString(1, domainSearch);
+ pstmt.setString(2, domainSearch);
+
+ try (ResultSet rs = pstmt.executeQuery()) {
+ while (rs.next()) {
+ Long domainId = rs.getLong(1);
+ List<String> vmUuidsAndNetworkUuids = Arrays.asList(rs.getString(2).split(","));
+
+ domainsOfSharedNetworksUsedByDomainPath.put(domainId, vmUuidsAndNetworkUuids);
+ }
+ }
+
+ return domainsOfSharedNetworksUsedByDomainPath;
+ } catch (SQLException e) {
+ logger.error(String.format("Failed to retrieve the domains of the shared networks with subdomain access used by domain with path [%s] due to [%s]. Returning an empty "
+ + "list of domains.", domainPath, e.getMessage()), e);
Review Comment:
if we keep escalating what we print on what level we won't need levels. Debug is for debugging. Error is for notifications of errors. The message should be very clear but these shouldn't clog the log. Recently in a formerly empty catch clause an error log was added and the people that were troubleshooting a problem got red herring'd by it.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#discussion_r1409698229
##########
server/src/main/java/com/cloud/dc/dao/DedicatedResourceDaoImpl.java:
##########
@@ -428,4 +447,35 @@ public List<Long> findHostsByZone(Long zoneId) {
}
return hosts;
}
+
+
+ @Override
+ public Map<Long, List<String>> listDomainsOfDedicatedResourcesUsedByDomainPath(String domainPath) {
+ LOGGER.debug(String.format("Retrieving the domains of the dedicated resources used by domain with path [%s].", domainPath));
+
+ TransactionLegacy txn = TransactionLegacy.currentTxn();
+ try (PreparedStatement pstmt = txn.prepareStatement(LIST_DOMAINS_OF_DEDICATED_RESOURCES_USED_BY_DOMAIN_PATH)) {
+ Map<Long, List<String>> domainsOfDedicatedResourcesUsedByDomainPath = new HashMap<>();
+
+ String domainSearch = domainPath.concat("%");
+ pstmt.setString(1, domainSearch);
+ pstmt.setString(2, domainSearch);
+
+ try (ResultSet rs = pstmt.executeQuery()) {
+ while (rs.next()) {
+ Long domainId = rs.getLong(1);
+ List<String> vmUuids = Arrays.asList(rs.getString(2).split(","));
+
+ domainsOfDedicatedResourcesUsedByDomainPath.put(domainId, vmUuids);
+ }
+ }
+
+ return domainsOfDedicatedResourcesUsedByDomainPath;
+ } catch (SQLException e) {
+ LOGGER.error(String.format("Failed to retrieve the domains of the dedicated resources used by domain with path [%s] due to [%s]. Returning an empty "
+ + "list of domains.", domainPath, e.getMessage()), e);
Review Comment:
```suggestion
LOGGER.error(String.format("Failed to retrieve the domains of the dedicated resources used by domain with path [%s] due to [%s]. Returning an empty "
+ "list of domains.", domainPath, e.getMessage()));
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(String.format("Failed to retrieve the domains of the dedicated resources used by domain with path [%s]. Returning an empty "
+ "list of domains.", domainPath), e);
}
```
##########
server/src/main/java/com/cloud/api/query/dao/NetworkOfferingJoinDaoImpl.java:
##########
@@ -120,4 +138,36 @@ public NetworkOfferingJoinVO newNetworkOfferingView(NetworkOffering offering) {
assert offerings != null && offerings.size() == 1 : "No network offering found for offering id " + offering.getId();
return offerings.get(0);
}
+
+
+
+ @Override
+ public Map<Long, List<String>> listDomainsOfNetworkOfferingsUsedByDomainPath(String domainPath) {
+ s_logger.debug(String.format("Retrieving the domains of the network offerings used by domain with path [%s].", domainPath));
+
+ TransactionLegacy txn = TransactionLegacy.currentTxn();
+ try (PreparedStatement pstmt = txn.prepareStatement(LIST_DOMAINS_OF_NETWORK_OFFERINGS_USED_BY_DOMAIN_PATH)) {
+ Map<Long, List<String>> domainsOfNetworkOfferingsUsedByDomainPath = new HashMap<>();
+
+ String domainSearch = domainPath.concat("%");
+ pstmt.setString(1, domainSearch);
+ pstmt.setString(2, domainSearch);
+
+ try (ResultSet rs = pstmt.executeQuery()) {
+ while (rs.next()) {
+ Long domainId = rs.getLong(1);
+ List<String> networkUuids = Arrays.asList(rs.getString(2).split(","));
+
+ domainsOfNetworkOfferingsUsedByDomainPath.put(domainId, networkUuids);
+ }
+ }
+
+ return domainsOfNetworkOfferingsUsedByDomainPath;
+ } catch (SQLException e) {
+ s_logger.error(String.format("Failed to retrieve the domains of the network offerings used by domain with path [%s] due to [%s]. Returning an empty "
+ + "list of domains.", domainPath, e.getMessage()), e);
Review Comment:
```suggestion
s_logger.error(String.format("Failed to retrieve the domains of the network offerings used by domain with path [%s] due to [%s]. Returning an empty "
+ "list of domains.", domainPath, e.getMessage()));
if (s_logger.isDebugEnabled()) {
s_logger.debug(String.format("Failed to retrieve the domains of the network offerings used by domain with path [%s]. Returning an empty "
+ "list of domains.", domainPath), e);
}
```
##########
engine/schema/src/main/java/org/apache/cloudstack/affinity/dao/AffinityGroupDomainMapDaoImpl.java:
##########
@@ -62,4 +85,35 @@ public List<AffinityGroupDomainMapVO> listByDomain(Object... domainId) {
return listBy(sc);
}
+ @Override
+ public Map<Long, List<String>> listDomainsOfAffinityGroupsUsedByDomainPath(String domainPath) {
+ logger.debug(String.format("Retrieving the domains of the affinity groups with subdomain access used by domain with path [%s].", domainPath));
+
+ TransactionLegacy txn = TransactionLegacy.currentTxn();
+ try (PreparedStatement pstmt = txn.prepareStatement(LIST_DOMAINS_WITH_AFFINITY_GROUPS_WITH_SUBDOMAIN_ACCESS_USED_BY_DOMAIN_PATH)) {
+ Map<Long, List<String>> domainsOfAffinityGroupsUsedByDomainPath = new HashMap<>();
+
+ String domainSearch = domainPath.concat("%");
+ pstmt.setString(1, domainSearch);
+ pstmt.setString(2, domainSearch);
+
+
+ try (ResultSet rs = pstmt.executeQuery()) {
+ while (rs.next()) {
+ Long domainId = rs.getLong(1);
+ List<String> vmUuidsAndAffinityGroupUuids = Arrays.asList(rs.getString(2).split(","));
+
+ domainsOfAffinityGroupsUsedByDomainPath.put(domainId, vmUuidsAndAffinityGroupUuids);
+ }
+ }
+
+ return domainsOfAffinityGroupsUsedByDomainPath;
+ } catch (SQLException e) {
+ logger.error(String.format("Failed to retrieve the domains of the affinity groups with subdomain access used by domain with path [%s] due to [%s]. Returning an " +
+ "empty list of domains.", domainPath, e.getMessage()), e);
Review Comment:
```suggestion
logger.error(String.format("Failed to retrieve the domains of the affinity groups with subdomain access used by domain with path [%s] due to [%s]. Returning an " +
"empty list of domains.", domainPath, e.getMessage()));
if (logger.isDebugEnabled()) {
logger.debug(String.format("Failed to retrieve the domains of the affinity groups with subdomain access used by domain with path [%s]. Returning an " +
"empty list of domains.", domainPath), e);
}
```
##########
server/src/main/java/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java:
##########
@@ -165,4 +183,35 @@ public ServiceOfferingJoinVO newServiceOfferingView(ServiceOffering offering) {
assert offerings != null && offerings.size() == 1 : "No service offering found for offering id " + offering.getId();
return offerings.get(0);
}
+
+
+ @Override
+ public Map<Long, List<String>> listDomainsOfServiceOfferingsUsedByDomainPath(String domainPath) {
+ s_logger.debug(String.format("Retrieving the domains of the service offerings used by domain with path [%s].", domainPath));
+
+ TransactionLegacy txn = TransactionLegacy.currentTxn();
+ try (PreparedStatement pstmt = txn.prepareStatement(LIST_DOMAINS_OF_SERVICE_OFFERINGS_USED_BY_DOMAIN_PATH)) {
+ Map<Long, List<String>> domainsOfServiceOfferingsUsedByDomainPath = new HashMap<>();
+
+ String domainSearch = domainPath.concat("%");
+ pstmt.setString(1, domainSearch);
+ pstmt.setString(2, domainSearch);
+
+ try (ResultSet rs = pstmt.executeQuery()) {
+ while (rs.next()) {
+ Long domainId = rs.getLong(1);
+ List<String> vmUuids = Arrays.asList(rs.getString(2).split(","));
+
+ domainsOfServiceOfferingsUsedByDomainPath.put(domainId, vmUuids);
+ }
+ }
+
+ return domainsOfServiceOfferingsUsedByDomainPath;
+ } catch (SQLException e) {
+ s_logger.error(String.format("Failed to retrieve the domains of the service offerings used by domain with path [%s] due to [%s]. Returning an empty "
+ + "list of domains.", domainPath, e.getMessage()), e);
Review Comment:
```suggestion
s_logger.error(String.format("Failed to retrieve the domains of the service offerings used by domain with path [%s] due to [%s]. Returning an empty "
+ "list of domains.", domainPath, e.getMessage()));
if (s_logger.isDebugEnabled()) {
s_logger.debug(String.format("Failed to retrieve the domains of the service offerings used by domain with path [%s]. Returning an empty "
+ "list of domains.", domainPath), e);
}
```
##########
engine/schema/src/main/java/com/cloud/network/dao/NetworkDomainDaoImpl.java:
##########
@@ -71,4 +92,34 @@ public List<Long> listNetworkIdsByDomain(long domainId) {
}
return networkIdsToReturn;
}
+
+ @Override
+ public Map<Long, List<String>> listDomainsOfSharedNetworksUsedByDomainPath(String domainPath) {
+ logger.debug(String.format("Retrieving the domains of the shared networks with subdomain access used by domain with path [%s].", domainPath));
+
+ TransactionLegacy txn = TransactionLegacy.currentTxn();
+ try (PreparedStatement pstmt = txn.prepareStatement(LIST_DOMAINS_OF_SHARED_NETWORKS_USED_BY_DOMAIN_PATH)) {
+ Map<Long, List<String>> domainsOfSharedNetworksUsedByDomainPath = new HashMap<>();
+
+ String domainSearch = domainPath.concat("%");
+ pstmt.setString(1, domainSearch);
+ pstmt.setString(2, domainSearch);
+
+ try (ResultSet rs = pstmt.executeQuery()) {
+ while (rs.next()) {
+ Long domainId = rs.getLong(1);
+ List<String> vmUuidsAndNetworkUuids = Arrays.asList(rs.getString(2).split(","));
+
+ domainsOfSharedNetworksUsedByDomainPath.put(domainId, vmUuidsAndNetworkUuids);
+ }
+ }
+
+ return domainsOfSharedNetworksUsedByDomainPath;
+ } catch (SQLException e) {
+ logger.error(String.format("Failed to retrieve the domains of the shared networks with subdomain access used by domain with path [%s] due to [%s]. Returning an empty "
+ + "list of domains.", domainPath, e.getMessage()), e);
Review Comment:
```suggestion
logger.error(String.format("Failed to retrieve the domains of the shared networks with subdomain access used by domain with path [%s] due to [%s]. Returning an empty "
+ "list of domains.", domainPath, e.getMessage()));
if (logger.isDebugEnabled()) {
logger.debug(String.format("Failed to retrieve the domains of the shared networks with subdomain access used by domain with path [%s]. Returning an empty "
+ "list of domains.", domainPath), e);
}
```
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1755276971
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1788650059
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "harikrishna-patnala (via GitHub)" <gi...@apache.org>.
harikrishna-patnala commented on code in PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#discussion_r1381148502
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/domain/MoveDomainCmd.java:
##########
@@ -0,0 +1,75 @@
+// 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 org.apache.cloudstack.api.command.admin.domain;
+
+import com.cloud.domain.Domain;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.user.Account;
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DomainResponse;
+
+import java.util.Objects;
+
+@APICommand(name = "moveDomain", description = "Moves a domain and its children to a new parent domain.", responseObject = DomainResponse.class,
Review Comment:
Can you please add "Since" parameter 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1755277686
@DaanHoogland 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed pull request #7446: Move subdomains between domains
URL: https://github.com/apache/cloudstack/pull/7446
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7446: Move subdomains between domains
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1674314854
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1788650759
@DaanHoogland a [SL] 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1794473237
@JoaoJandre will you address @harikrishna-patnala 's comments?
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1847637865
@shwstppr a [SL] 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr closed pull request #7446: Move subdomains between domains
URL: https://github.com/apache/cloudstack/pull/7446
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] JoaoJandre commented on pull request #7446: Move subdomains between domains
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1671860564
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7446: Move subdomains between domains
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1674315747
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed pull request #7446: Move subdomains between domains
URL: https://github.com/apache/cloudstack/pull/7446
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1755094208
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7446: Move subdomains between domains
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1675282568
<b>[SF] Trillian test result (tid-7377)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 42735 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7446-t7377-kvm-centos7.zip
Smoke tests completed. 112 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_01_migrate_VM_and_root_volume | `Error` | 83.78 | test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks | `Error` | 54.47 | test_vm_life_cycle.py
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1847627570
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7995
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1789771280
<b>[SF] Trillian test result (tid-8192)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 45353 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7446-t8192-kvm-centos7.zip
Smoke tests completed. 113 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_02_trigger_shutdown | `Failure` | 337.08 | test_safe_shutdown.py
test_10_reboot_cpvm_forced | `Error` | 6.24 | test_ssvm.py
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #7446: Move subdomains between domains
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1513792923
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=7446)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7446&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7446&resolved=false&types=BUG) [2 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7446&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7446&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7446&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7446&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7446&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7446&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7446&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7446&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7446&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7446&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7446&metric=new_coverage&view=list) [0.4% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7446&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7446&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7446&metric=new_duplicated_lines_density&view=list)
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud commented on pull request #7446: Move subdomains between domains
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1514236604
Thanks for the PR @JoaoJandre interesting use-case. Do you think there should also be some kind of domain-limits check (for ex. moving sub-domain1 to a new parent could mean different limits on vms, volume, cpu, templates, storage etc. need to be recalculated/checked)? Also side-effects in (already produced) usage data and networks?
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] codecov[bot] commented on pull request #7446: Move subdomains between domains
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1515734972
## [Codecov](https://codecov.io/gh/apache/cloudstack/pull/7446?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#7446](https://codecov.io/gh/apache/cloudstack/pull/7446?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b6f5eff) into [main](https://codecov.io/gh/apache/cloudstack/commit/514df7b3a056ef70dd76ff62827a1d9bb079b5fc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (514df7b) will **decrease** coverage by `0.01%`.
> The diff coverage is `2.32%`.
```diff
@@ Coverage Diff @@
## main #7446 +/- ##
============================================
- Coverage 12.70% 12.70% -0.01%
- Complexity 8691 8693 +2
============================================
Files 2729 2729
Lines 256600 256732 +132
Branches 39990 40004 +14
============================================
+ Hits 32604 32607 +3
- Misses 219847 219976 +129
Partials 4149 4149
```
| [Impacted Files](https://codecov.io/gh/apache/cloudstack/pull/7446?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/java/com/cloud/server/ManagementServerImpl.java](https://codecov.io/gh/apache/cloudstack/pull/7446?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL3NlcnZlci9NYW5hZ2VtZW50U2VydmVySW1wbC5qYXZh) | `5.65% <0.00%> (-0.01%)` | :arrow_down: |
| [...rc/main/java/com/cloud/user/DomainManagerImpl.java](https://codecov.io/gh/apache/cloudstack/pull/7446?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL3VzZXIvRG9tYWluTWFuYWdlckltcGwuamF2YQ==) | `25.64% <1.11%> (-6.09%)` | :arrow_down: |
| [...va/com/cloud/network/dao/NetworkDomainDaoImpl.java](https://codecov.io/gh/apache/cloudstack/pull/7446?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZW5naW5lL3NjaGVtYS9zcmMvbWFpbi9qYXZhL2NvbS9jbG91ZC9uZXR3b3JrL2Rhby9OZXR3b3JrRG9tYWluRGFvSW1wbC5qYXZh) | `25.00% <5.26%> (-17.86%)` | :arrow_down: |
| [...ck/affinity/dao/AffinityGroupDomainMapDaoImpl.java](https://codecov.io/gh/apache/cloudstack/pull/7446?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZW5naW5lL3NjaGVtYS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvY2xvdWRzdGFjay9hZmZpbml0eS9kYW8vQWZmaW5pdHlHcm91cERvbWFpbk1hcERhb0ltcGwuamF2YQ==) | `2.94% <5.26%> (+2.94%)` | :arrow_up: |
... and [1 file with indirect coverage changes](https://codecov.io/gh/apache/cloudstack/pull/7446/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
: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&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1830822963
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 7857
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1832404914
<b>[SF] Trillian test result (tid-8416)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 41024 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7446-t8416-kvm-centos7.zip
Smoke tests completed. 118 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1836047304
@JoaoJandre @DaanHoogland any consensus here?
Are all issues/comments raised by @rajujith already addressed? https://github.com/apache/cloudstack/pull/7446#pullrequestreview-1724439749
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1840153036
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1840614363
> @JoaoJandre @DaanHoogland any consensus here? Are all issues/comments raised by @rajujith already addressed? [#7446 (review)](https://github.com/apache/cloudstack/pull/7446#pullrequestreview-1724439749)
@shwstppr yes, all the comments raised by @rajujith were addressed.
> I recently encoutered a similar issue and I am actually -1 on this without my sugestion because of that. I think you even agreed with me on that ticket, @JoaoJandre. we need to allow users to minimise logging by using a lesser level. cc @shwstppr
>
> ad. #8278
@DaanHoogland I thought a little more about it and in this instance I don't see a problem with this approach. But I don't think that this should always be the case (only have stacktraces on debug or lower). I'll make a post on the discussion thread later.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1846586932
Thanks for the testing @rajujith
@JoaoJandre is improving the error message something that can be done in a separate PR?
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] github-actions[bot] commented on pull request #7446: Move subdomains between domains
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1667609673
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] JoaoJandre commented on pull request #7446: Move subdomains between domains
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1516276879
> Thanks for the PR @JoaoJandre interesting use-case. Do you think there should also be some kind of domain-limits check (for ex. moving sub-domain1 to a new parent could mean different limits on vms, volume, cpu, templates, storage etc. need to be recalculated/checked)? Also side-effects in (already produced) usage data and networks?
Hey @rohityadavcloud, thanks for the suggestion, I actually agree with you, there should be some kind of domain-limits check. I will put this in draft until I have the time to add this check.
About the side-effects in usage data, there shouldn't be any, as the usage data only uses the domain ID, and that is not changed when the domain is moved, only the domain path is changed. About networks, we already validate shared networks before moving the domain, what other side-effects could be an issue with networks?
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1830350548
@DaanHoogland @rajujith @shwstppr @harikrishna-patnala I've addressed the comments/test failures.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1840269100
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7921
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1840276783
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1841637979
<b>[SF] Trillian test result (tid-8466)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 44180 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7446-t8466-kvm-centos7.zip
Smoke tests completed. 121 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1847546335
@shwstppr a [SL] 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1847530450
@shwstppr @rajujith I've added more context to the error message, could you please review the last commit?
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] JoaoJandre commented on pull request #7446: Move subdomains between domains
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1673746529
> @rohityadavcloud @JoaoJandre was this extra consideration of quota limits addressed here?
>
> > > Thanks for the PR @JoaoJandre interesting use-case. Do you think there should also be some kind of domain-limits check (for ex. moving sub-domain1 to a new parent could mean different limits on vms, volume, cpu, templates, storage etc. need to be recalculated/checked)? Also side-effects in (already produced) usage data and networks?
> >
> >
> > Hey @rohityadavcloud, thanks for the suggestion, I actually agree with you, there should be some kind of domain-limits check. I will put this in draft until I have the time to add this check.
> > About the side-effects in usage data, there shouldn't be any, as the usage data only uses the domain ID, and that is not changed when the domain is moved, only the domain path is changed. About networks, we already validate shared networks before moving the domain, what other side-effects could be an issue with networks?
@DaanHoogland yes I addressed it on commit 88d77658cb9e66e339495d0bd9af9d90041e9674, I just forgot to make a comment about it.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1787378693
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "harikrishna-patnala (via GitHub)" <gi...@apache.org>.
harikrishna-patnala commented on code in PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#discussion_r1381126818
##########
engine/schema/src/main/java/org/apache/cloudstack/affinity/dao/AffinityGroupDomainMapDaoImpl.java:
##########
@@ -16,23 +16,46 @@
// under the License.
package org.apache.cloudstack.affinity.dao;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import javax.annotation.PostConstruct;
+import com.cloud.network.dao.NetworkDomainDaoImpl;
+import com.cloud.utils.db.TransactionLegacy;
Review Comment:
reorder these imports please
##########
server/src/main/java/com/cloud/user/DomainManagerImpl.java:
##########
@@ -900,4 +912,171 @@ private void updateDomainChildren(DomainVO domain, String updatedDomainPrefix) {
}
}
+ @Override
+ @ActionEvent(eventType = EventTypes.EVENT_DOMAIN_MOVE, eventDescription = "moving Domain")
+ @DB
+ public Domain moveDomainAndChildrenToNewParentDomain(MoveDomainCmd cmd) throws ResourceAllocationException {
+ Long idOfDomainToBeMoved = cmd.getDomainId();
+ Long idOfNewParentDomain = cmd.getParentDomainId();
+
Review Comment:
I think we also need to check the access permissions something like
Account caller = getCaller();
_accountMgr.checkAccess(caller, domain);
and
_accountMgr.checkAccess(caller, parentDomain);
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/domain/MoveDomainCmd.java:
##########
@@ -0,0 +1,75 @@
+// 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 org.apache.cloudstack.api.command.admin.domain;
+
+import com.cloud.domain.Domain;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.user.Account;
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DomainResponse;
+
+import java.util.Objects;
+
+@APICommand(name = "moveDomain", description = "Moves a domain and its children to a new parent domain.", responseObject = DomainResponse.class,
+ requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, authorized = {RoleType.Admin})
+public class MoveDomainCmd extends BaseCmd {
+
+ private static final String APINAME = "moveDomain";
+ @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, required = true, entityType = DomainResponse.class, description = "The ID of the domain to be moved.")
+ private Long domainId;
+
+ @Parameter(name = ApiConstants.PARENT_DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class,
+ description = "The ID of the new parent domain of the domain to be moved. If no parent domain is specified, the ROOT domain is assumed.")
+ private Long parentDomainId;
+
+ public Long getDomainId() {
+ return domainId;
+ }
+
+ public Long getParentDomainId() {
Review Comment:
is it better to mark the parent DomainId as required field instead of defaulting it to ROOT ? I think moving domain is an major/important action and operator should provide exact parent ID for better confirmation.
##########
api/src/main/java/com/cloud/user/DomainService.java:
##########
@@ -18,12 +18,14 @@
import java.util.List;
+import com.cloud.exception.ResourceAllocationException;
Review Comment:
reorder these imports please
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1820424287
@JoaoJandre any update 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on code in PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#discussion_r1410855464
##########
engine/schema/src/main/java/com/cloud/network/dao/NetworkDomainDaoImpl.java:
##########
@@ -71,4 +92,34 @@ public List<Long> listNetworkIdsByDomain(long domainId) {
}
return networkIdsToReturn;
}
+
+ @Override
+ public Map<Long, List<String>> listDomainsOfSharedNetworksUsedByDomainPath(String domainPath) {
+ logger.debug(String.format("Retrieving the domains of the shared networks with subdomain access used by domain with path [%s].", domainPath));
+
+ TransactionLegacy txn = TransactionLegacy.currentTxn();
+ try (PreparedStatement pstmt = txn.prepareStatement(LIST_DOMAINS_OF_SHARED_NETWORKS_USED_BY_DOMAIN_PATH)) {
+ Map<Long, List<String>> domainsOfSharedNetworksUsedByDomainPath = new HashMap<>();
+
+ String domainSearch = domainPath.concat("%");
+ pstmt.setString(1, domainSearch);
+ pstmt.setString(2, domainSearch);
+
+ try (ResultSet rs = pstmt.executeQuery()) {
+ while (rs.next()) {
+ Long domainId = rs.getLong(1);
+ List<String> vmUuidsAndNetworkUuids = Arrays.asList(rs.getString(2).split(","));
+
+ domainsOfSharedNetworksUsedByDomainPath.put(domainId, vmUuidsAndNetworkUuids);
+ }
+ }
+
+ return domainsOfSharedNetworksUsedByDomainPath;
+ } catch (SQLException e) {
+ logger.error(String.format("Failed to retrieve the domains of the shared networks with subdomain access used by domain with path [%s] due to [%s]. Returning an empty "
+ + "list of domains.", domainPath, e.getMessage()), e);
Review Comment:
@DaanHoogland, when the error happens, if the operator is not with the debug logs active, they will not have the stacktrace to track the issue. They would have to change the logging level and try to reproduce the error; here's the catch: what if we can't reproduce the error easily?
Also, from my experience, operators tend to search for exception on `ERROR` and `WARN` levels, and ignore them in lower level logs (like `INFO` or `DEBUG`). What would be the point in printing the stacktrace on `DEBUG` level?
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1847637328
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1848306616
<b>[SF] Trillian test result (tid-8529)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 46978 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7446-t8529-kvm-centos7.zip
Smoke tests completed. 120 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_08_upgrade_kubernetes_ha_cluster | `Failure` | 793.35 | test_kubernetes_clusters.py
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1840278073
@shwstppr a [SL] 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1840155914
@shwstppr a [SL] 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1755268063
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 7305
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7446: Move subdomains between domains
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1671951282
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 6724
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1842411882
ping @harikrishna-patnala @rajujith
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1847544665
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1806284537
> @JoaoJandre I tested the PR, the feature works in general, and it's good. However, I encountered the below scenarios that need to be reviewed and discussed.
>
> 1. Moving a domain to a parent domain with no resource limit i.e unlimited doesn't work. There appears to be something wrong with the implementation.
>
>
> ```
> (MoveDomainPR) 🐱 > move domain domainid=010957cd-4388-4ba0-a18d-d5df0814ad06 parentdomainid=41928b19-adf8-4524-8ca6-16d395a1136c
> 🙈 Error: (HTTP 535, error code 4370) Cannot move domain [010957cd-4388-4ba0-a18d-d5df0814ad06] to parent domain [41928b19-adf8-4524-8ca6-16d395a1136c] as maximum domain resource limit of type [user_vm] would be exceeded. The current resource count for domain [010957cd-4388-4ba0-a18d-d5df0814ad06] is [0], the resource count for the new parent domain [41928b19-adf8-4524-8ca6-16d395a1136c] is [0], and the limit is [-1].
> ```
>
> `https://github.com/scclouds/cloudstack/blob/029164cb1d33b92ece6a9557fb514b490988d1a0/server/src/main/java/com/cloud/user/DomainManagerImpl.java#L981C12-L981C108`
>
> 2. I am able to move a domain while there are resources deployed on a cluster dedicated to the previous parent domain. Further start operation and new deployment fails as it is the only cluster in the zone. This doesn't seem ideal.
>
> 3. Move with instance created from computer offering dedicated to parent domain : This is currently allowed but not sure whether it should be allowed. On Clicking the Compute offering (from instance details) after moving the domain we get 404.
>
> 4. Move domain with instances deployed to network created from network offering dedicated to parent domain: This is currently allowed but not sure whether it should be allowed. On Clicking the Network offering (from network details) after moving the domain we get 404.
>
>
> cc @harikrishna-patnala
@rajujith thanks for testing, I'll try to address your comments next week.
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1830734186
@shwstppr a [SL] 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1836201034
I recently encoutered a similar issue and I am actually -1 on this without my sugestion because of that. I think you even agreed with me on that ticket, @JoaoJandre. we need to allow users to minimise logging by using a lesser level.
cc @shwstppr
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1840717331
@harikrishna-patnala @rajujith can you approve on the current state of this PR?
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1795484866
@DaanHoogland sure, I've been a bit busy lately, but I will address the comments as soon as I can :)
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on code in PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#discussion_r1384962764
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/domain/MoveDomainCmd.java:
##########
@@ -0,0 +1,75 @@
+// 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 org.apache.cloudstack.api.command.admin.domain;
+
+import com.cloud.domain.Domain;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.user.Account;
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DomainResponse;
+
+import java.util.Objects;
+
+@APICommand(name = "moveDomain", description = "Moves a domain and its children to a new parent domain.", responseObject = DomainResponse.class,
+ requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, authorized = {RoleType.Admin})
+public class MoveDomainCmd extends BaseCmd {
+
+ private static final String APINAME = "moveDomain";
+ @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, required = true, entityType = DomainResponse.class, description = "The ID of the domain to be moved.")
+ private Long domainId;
+
+ @Parameter(name = ApiConstants.PARENT_DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class,
+ description = "The ID of the new parent domain of the domain to be moved. If no parent domain is specified, the ROOT domain is assumed.")
+ private Long parentDomainId;
+
+ public Long getDomainId() {
+ return domainId;
+ }
+
+ public Long getParentDomainId() {
Review Comment:
I agree, I'll change 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1756552257
<b>[LL]Trillian test result (tid-6814)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 43351 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7446-t6814-kvm-centos7.zip
Smoke tests completed. 113 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1755084995
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1755091431
@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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr closed pull request #7446: Move subdomains between domains
URL: https://github.com/apache/cloudstack/pull/7446
--
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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Move subdomains between domains [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7446:
URL: https://github.com/apache/cloudstack/pull/7446#issuecomment-1787381824
@DaanHoogland a [SL] 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org