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

1356721 - Filter/Validate hosts aren't already deploying #1083

Merged
merged 2 commits into from
Jul 22, 2016
Merged

1356721 - Filter/Validate hosts aren't already deploying #1083

merged 2 commits into from
Jul 22, 2016

Conversation

cfchase
Copy link
Contributor

@cfchase cfchase commented Jul 22, 2016

  • Added validation that no other fusor deployment is running.
  • Added validation that deployment's hosts are not already managed.
  • Added filter for engine/hypervisor discovered hosts to omit hosts associated with a currently running deployment.

@cfchase cfchase assigned cfchase, eriknelson and dymurray and unassigned cfchase Jul 22, 2016
deployment.errors[:foreman_task_uuid] << _("Deployment #{other.id}: #{other.name} is already running")
end
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ruby looks good. My biggest worry is we have to wait for one deployment to completely finish before being able to kick the other one off. The biggest issue I see with multiples running at the same time is manage_content failing. But if we truly only support one at a time, this is it.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 70.488% when pulling abd36a5 on cfchase:stale-hosts into c485018 on fusor:master.

@jmrodri
Copy link
Contributor

jmrodri commented Jul 22, 2016

PR title has a typo: 'FIlter' instead of 'Filter'

@cfchase cfchase changed the title 1356721 - FIlter/Validate hosts aren't already deploying 1356721 - Filter/Validate hosts aren't already deploying Jul 22, 2016
@cfchase
Copy link
Contributor Author

cfchase commented Jul 22, 2016

fixed PR title

@coveralls
Copy link

coveralls commented Jul 22, 2016

Coverage Status

Coverage increased (+0.1%) to 70.712% when pulling 835baeb on cfchase:stale-hosts into c485018 on fusor:master.

@coveralls
Copy link

coveralls commented Jul 22, 2016

Coverage Status

Coverage increased (+0.1%) to 70.712% when pulling 1c05b96 on cfchase:stale-hosts into c485018 on fusor:master.

@@ -119,7 +124,7 @@ export default Ember.Controller.extend(NeedsDeploymentMixin, {
!trackedHostIds
.filter((hostId) => this.get('hypervisorModelIds').contains(hostId))
.map((k) => vState.get(k))
.reduce((lhs, rhs) => lhs && rhs);
.reduce((previousAreTrue, currentValue) => previousAreTrue && currentValue, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better var names 👍 I was guilty of the lhs/rhs

@cfchase cfchase changed the title 1356721 - Filter/Validate hosts aren't already deploying [WIP] 1356721 - Filter/Validate hosts aren't already deploying Jul 22, 2016
Added validation that deployment's hosts are not already managed.
hosts associated with a currently running deployment.
@cfchase cfchase changed the title [WIP] 1356721 - Filter/Validate hosts aren't already deploying 1356721 - Filter/Validate hosts aren't already deploying Jul 22, 2016
@eriknelson
Copy link
Contributor

I know you were concerned about the promises here, but I actually think it's pretty clean given what had to be done to get the hosts. Read okay to me. ACK ember

@coveralls
Copy link

coveralls commented Jul 22, 2016

Coverage Status

Coverage increased (+0.1%) to 70.712% when pulling 5172304 on cfchase:stale-hosts into c485018 on fusor:master.

@cfchase cfchase merged commit a52a52f into fusor:master Jul 22, 2016
@cfchase cfchase deleted the stale-hosts branch July 22, 2016 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants