Skip to content
This repository was archived by the owner on Jul 24, 2019. It is now read-only.

Issue #207 Stnd control plane node issue - #302

Merged
wilkers-steve merged 1 commit into
att-comdev:masterfrom
renmak:stnd_control_plane_node_issue_207
Apr 7, 2017
Merged

wilkers-steve merged 1 commit into
att-comdev:masterfrom
renmak:stnd_control_plane_node_issue_207

Conversation

@renmak

@renmak renmak commented Mar 23, 2017

Copy link
Copy Markdown
Contributor

What is the purpose of this pull request?: Updating Nova label name and value to align with how labels are used in Neutron

What issue does this pull request address?: Fixes issue #207. Also this new PR replaces previous PR #285

Notes for reviewers to consider: Please look at comment from Allan in PR #285. My new changes in this PR are based on his comment.

Specific reviewers for pull request: @alanmeadows @v1k0d3n

@gardlt

gardlt commented Mar 23, 2017 •

Copy link
Copy Markdown
Contributor

should we try and propagate this changes to the other charts as well not just the keystone and compute ones. @intlabs @v1k0d3n @renmak

@wilkers-steve

Copy link
Copy Markdown
Contributor

@renmak Thanks for taking this on. I looked through the comments on PR #285, and this gets us closer. However, I think it doesn't quite get us to where @alanmeadows suggested for the labels for nova. Instead of having a blanket approach to labels under a compute and control tree, I think the goal is to split this out per service that Nova runs. So instead of compute: or control:, it'd be conductor:, compute:, scheduler:, and so on -- at least that's my understand. Could you share your thoughts on that @alanmeadows?

@renmak

renmak commented Mar 27, 2017

Copy link
Copy Markdown
Contributor Author

@wilkers-steve @v1k0d3n @alanmeadows
So if we go by services, it would look like following

consoleauth: openstack-compute-node
scheduler: openstack-control-plane
conductor: openstack-control-plane
compute: openstack-control-plane
network:
api:

We will refer to above key value as
{{ .Values.labels**.scheduler.**node_selector_key }}

Is this what you guys have in mind? Thanks

@alanmeadows

Copy link
Copy Markdown
Contributor

This looks good, except I agree with steve, lets just break it out, and simultaneously, achieve parity with neutron and its agent approach:

labels:
  agent:
    compute:
      node_sele...
  osapi: 
    node_sele...
  conductor:
    node_sele...

also, even though its outside this pull request, can we fix replicas as its now a bit strange with the removal of control and is a simple fix. See any other chart for how replicas has shaped up (except in nova)

replicas:
  api: ..
  conductor: ..
...and so on...

@renmak

renmak commented Mar 28, 2017 •

Copy link
Copy Markdown
Contributor Author

@alanmeadows @wilkers-steve @v1k0d3n @intlabs

Thanks Alan for feedback. So based on your feedback, this is what i came up with. Please correct me if this is incorrect.

So based on openstack-helm/nova/templates/ each, daemonset and deployment have been addressed below.

labels:
  agent:
    compute: 
      node_selector_key: openstack-compute-plane
      node_selector_value: enabled
    libvert:
      node_selector_key: openstack-control-plane
      node_selector_value: enabled
  conductor:
    node_selector_key: openstack-control-plane
    node_selector_value: enabled
  consoleauth:
    node_selector_key: openstack-control-plane
    node_selector_value: enabled
  scheduler:
    node_selector_key: openstack-control-plane
    node_selector_value: enabled
  osapi:
    node_selector_key: openstack-control-plane
    node_selector_value: enabled
  api-metadata:
    node_selector_key: openstack-control-plane
    node_selector_value: enabled
  server:
    node_selector_key: openstack-control-plane
    node_selector_value: enabled

@alanmeadows

alanmeadows commented Mar 28, 2017 •

Copy link
Copy Markdown
Contributor

Libvirt isn't really an agent, but this could work for now

labels:
  agent:
    compute: 
      node_selector_key: openstack-compute-node
      node_selector_value: enabled
    libvirt:
      node_selector_key: openstack-compute-node
      node_selector_value: enabled

Note the openstack-compute-node for agent processes (those that run on compute hosts vs control plane)

All the other definitions are fine, but what is server: here for nova?

@renmak

renmak commented Mar 28, 2017

Copy link
Copy Markdown
Contributor Author

k that's my misunderstanding. server: should not be there.

But that brings up a question. We have total 5 jobs. db-init, db-sync, ks-endpoints, ks-service and ks-user. Each of these jobs refers to openstack-control-plane.

Which label do we use for these jobs?

@alanmeadows

alanmeadows commented Mar 28, 2017 •

Copy link
Copy Markdown
Contributor

I would just add the below and have them refer to this. I do not think we have standardized this approach (allowing jobs (as a holistic category) to target their label), but a separate pull request could introduce this pattern everywhere:

labels:
  job:
    node_selector_key: openstack-control-plane
    node_selector_value: enabled

Defining a label for each job may be overkill.

@renmak

renmak commented Mar 28, 2017

Copy link
Copy Markdown
Contributor Author

Thanks for clarification Alan.

As per your suggestions on Replicas, here is what i was planning.

replicas:
  api: 1    #for both api-osapi & api-metadata. Should i also 
  conductor: 1
  consoleauth: 1
  scheduler: 1 

I will make needed code changes and update this PR.

@alanmeadows

Copy link
Copy Markdown
Contributor

All sounds fine except I would ensure metadata has its own replica declaration, much like api-metadata does. This gives you parity with labels.

Also, if we're calling it "osapi" consistently, lets use that for replicas as well.

The goal is consistent naming between the names within the deployment manifests themselves, the replica fields, and the label fields so that all three match as closely as possible.

@v1k0d3n v1k0d3n added this to the 0.3.0 milestone Mar 29, 2017

@wilkers-steve wilkers-steve left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@renmak This is looking good. A few things to address then this looks close to good for me

Comment thread nova/templates/daemonset-libvirt.yaml Outdated
spec:
nodeSelector:
{{ .Values.labels.compute_node_selector_key }}: {{ .Values.labels.compute_node_selector_value }}
{{ .Values.labels.agent.libvert.node_selector_key }}: {{ .Values.labels.agent.libvert.node_selector_value }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/libvert/libvirt

Comment thread nova/values.yaml Outdated
compute:
node_selector_key: openstack-compute-plane
node_selector_value: enabled
libvert:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/libvert/libvirt

Comment thread nova/values.yaml Outdated
compute_replicas: 1
agent:
compute:
node_selector_key: openstack-compute-plane

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should be openstack-compute-node instead of openstack-compute-plane

Comment thread nova/values.yaml Outdated
node_selector_key: openstack-compute-plane
node_selector_value: enabled
libvert:
node_selector_key: openstack-compute-plane

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also openstack-compute-node, not openstack-compute-plane

@renmak

renmak commented Mar 29, 2017

Copy link
Copy Markdown
Contributor Author

I will squash all these commits into one final commit

@renmak
renmak force-pushed the stnd_control_plane_node_issue_207 branch 2 times, most recently from 329d281 to fd953d8 Compare March 29, 2017 18:58
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }}
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

are we going to assign jobs to different nodes than our deployments?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Though unlikely there is a small possibility that some people may want to do this; as these pods will contain things like root db creds that the wider control-plane population will never see.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

fair enough. sounds good to me. :)

@v1k0d3n
v1k0d3n self-requested a review April 6, 2017 14:07

@v1k0d3n v1k0d3n left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. @wilkers-steve or other cores, i think we can merge this in when you're ready.

name: nova-api-metadata
spec:
replicas: {{ .Values.control_replicas }}
replicas: {{ .Values.replicas.api-metadata }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Helm won't be able to package up the chart with .Values.replicas.api-metadata. You can only use alphanumeric and underscores in YAML keys. Something like .Values.replicas.api_metadata will build.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch @larryrensing

spec:
nodeSelector:
{{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }}
{{ .Values.labels.api-metadata.node_selector_key }}: {{ .Values.labels.api-metadata.node_selector_value }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Comment thread nova/values.yaml Outdated
node_selector_value: enabled

replicas:
api-metadata: 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Comment thread nova/values.yaml Outdated
osapi:
node_selector_key: openstack-control-plane
node_selector_value: enabled
api-metadata:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Comment thread nova/values.yaml
# This is a YAML-formatted file.
# Declare name/value pairs to be passed into your templates.
# name: value

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

keep this space

@wilkers-steve wilkers-steve left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@renmak, @larryrensing pointed out the remaining issues that should be addressed before we merge this in. Once those are complete, I think this should be good.

@renmak

renmak commented Apr 6, 2017

Copy link
Copy Markdown
Contributor Author

Thanks for review and catching bug. I will work on this today and get code changes in.

@v1k0d3n
v1k0d3n self-requested a review April 6, 2017 22:47

@v1k0d3n v1k0d3n left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nice work @renmak, and good catch @larryrensing. LGTM.

…nd Replicas for consistency in values.yaml.
@renmak
renmak force-pushed the stnd_control_plane_node_issue_207 branch from 5f90fd1 to f020ef6 Compare April 6, 2017 22:50
@renmak

renmak commented Apr 6, 2017

Copy link
Copy Markdown
Contributor Author

K so update one final commit with all changes. Thanks @v1k0d3n @wilkers-steve @larryrensing
for reviews.

@wilkers-steve

Copy link
Copy Markdown
Contributor

@renmak This looks good. Thanks for fixing this. Pulled it down locally and everything runs fine. I'll go ahead and merge this in once @larryrensing signs off on the changes being satisfactory

@intlabs

intlabs commented Apr 7, 2017

Copy link
Copy Markdown
Contributor

LGTM :) I'd merge @wilkers-steve

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants