mirror of
https://github.com/apache/nifi.git
synced 2025-02-11 04:25:22 +00:00
NIFI-8419 This closes #4994. Fix issues with contoller services during parameter context update in a secure instance
Signed-off-by: Joe Witt <joewitt@apache.org>
This commit is contained in:
parent
6309ab96d1
commit
1ab4cf5307
@ -1158,7 +1158,7 @@ public class ProcessGroupResource extends FlowUpdateResource<ProcessGroupImportE
|
||||
URI groupUri;
|
||||
try {
|
||||
groupUri = new URI(originalUri.getScheme(), originalUri.getUserInfo(), originalUri.getHost(),
|
||||
originalUri.getPort(), "/nifi-api/flow/process-groups/" + groupId + "/controller-services", "includeAncestorGroups=false,includeDescendantGroups=true", originalUri.getFragment());
|
||||
originalUri.getPort(), "/nifi-api/flow/process-groups/" + groupId + "/controller-services", "includeAncestorGroups=false&includeDescendantGroups=true", originalUri.getFragment());
|
||||
} catch (URISyntaxException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
@ -454,7 +454,7 @@ public class ClusterReplicationComponentLifecycle implements ComponentLifecycle
|
||||
URI groupUri;
|
||||
try {
|
||||
groupUri = new URI(originalUri.getScheme(), originalUri.getUserInfo(), originalUri.getHost(),
|
||||
originalUri.getPort(), "/nifi-api/flow/process-groups/" + groupId + "/controller-services", "includeAncestorGroups=false,includeDescendantGroups=true", originalUri.getFragment());
|
||||
originalUri.getPort(), "/nifi-api/flow/process-groups/" + groupId + "/controller-services", "includeAncestorGroups=false&includeDescendantGroups=true", originalUri.getFragment());
|
||||
} catch (URISyntaxException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@ -482,6 +482,7 @@ public class ClusterReplicationComponentLifecycle implements ComponentLifecycle
|
||||
final Set<ControllerServiceEntity> serviceEntities = controllerServicesEntity.getControllerServices();
|
||||
|
||||
final Map<String, AffectedComponentEntity> affectedServices = serviceEntities.stream()
|
||||
.filter(s -> serviceIds.contains(s.getId()))
|
||||
.collect(Collectors.toMap(ControllerServiceEntity::getId, dtoFactory::createAffectedComponentEntity));
|
||||
|
||||
if (isControllerServiceValidationComplete(serviceEntities, affectedServices)) {
|
||||
|
@ -386,11 +386,11 @@ public class LocalComponentLifecycle implements ComponentLifecycle {
|
||||
|
||||
boolean allReachedDesiredState = true;
|
||||
for (final ControllerServiceEntity serviceEntity : serviceEntities) {
|
||||
final ControllerServiceDTO serviceDto = serviceEntity.getComponent();
|
||||
if (!affectedServices.containsKey(serviceDto.getId())) {
|
||||
if (!affectedServices.containsKey(serviceEntity.getId())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final ControllerServiceDTO serviceDto = serviceEntity.getComponent();
|
||||
final String validationStatus = serviceDto.getValidationStatus();
|
||||
if (ControllerServiceDTO.INVALID.equals(validationStatus)) {
|
||||
switch (invalidComponentAction) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user