Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(provider/dcos): Use createApp instead of updateApp for deploy #2136

Merged
merged 5 commits into from
Nov 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class DcosSpectatorHandler implements InvocationHandler {
}

if (failure != null) {
throw new Throwable(method.name, failure)
throw failure
} else {
return result
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class DeployDcosServerGroupAtomicOperation implements AtomicOperation<Deployment
task.updateStatus BASE_PHASE, "Marathon ID chosen to be $dcosPathId."
task.updateStatus BASE_PHASE, "Building application..."

dcosClient.updateApp(dcosPathId.toString(), descriptionToAppMapper.map(dcosPathId.toString(), description), description.forceDeployment)
dcosClient.createApp(descriptionToAppMapper.map(dcosPathId.toString(), description))

task.updateStatus BASE_PHASE, "Deployed service ${resolvedServerGroupName}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class DeployDcosServerGroupDescriptionToAppMapper {
it
} : null
volumes = parseVolumes(description.persistentVolumes, description.dockerVolumes, description.externalVolumes)
type = volumes ? "DOCKER" : null
type = docker ? "DOCKER" : null

it
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import com.netflix.spinnaker.clouddriver.dcos.DcosConfigurationProperties
import com.netflix.spinnaker.clouddriver.security.AccountCredentialsRepository
import com.netflix.spinnaker.clouddriver.security.CredentialsInitializerSynchronizable
import com.netflix.spinnaker.clouddriver.security.ProviderUtils
import feign.FeignException
import groovy.util.logging.Slf4j
import mesosphere.dcos.client.DCOS
import mesosphere.dcos.client.DCOSException
Expand Down Expand Up @@ -113,7 +114,7 @@ class DcosCredentialsInitializer implements CredentialsInitializerSynchronizable
DCOS client = clientProvider.getDcosClient(clusterCredentials)
try {
client.getServerInfo()
} catch (DCOSException e) {
} catch (DCOSException | FeignException e) {
LOGGER.error("[account={}] There was a problem trying to connect to the cluster with url=[{}] using uid=[{}]. Details: ", account.name, cluster.dcosUrl, clusterConfig.uid, e)
}

Expand Down