GCE-support#658
Conversation
Template name is conflicting with the template name from 'eap6-basic-sti.json' .
|
Can one of the admins verify this patch? |
Fix for name conflict
Add kind/apiVersion to scheduler.json template
This reverts commit 3073d1f.
|
The only difference of my code with previous PR #641 is that playbooks/openstack/openshift-cluster/launch.yml is right now |
|
ok to test |
|
@sdodson are you ok with this version? |
There was a problem hiding this comment.
Even though this change makes sense, this seems unrelated to the purpose of this PR, why's this here?
There was a problem hiding this comment.
Actually, this doesn't make sense to me. The way it's written it would use nova.ini in the same location as nova.py (ie in the git checkout) which I don't suspect anyone would modify in place. I think it'd be more likely that they'd expect it to look for it in cwd, do you agree?
There was a problem hiding this comment.
I agree with you that this change is not related at all to GCE ... however this change makes sense :
nova.ini is located in the same directory than nova.py
Getcwd will return the location from where we execute the script nova.py resulting in an error if the script is executed from directory different. So this is fixing that issue.
On AWS, GCE, LIBVIRT we take the .ini file in the same location as the .py
So I think it was just a mistake to use getcwd for Openstack
Anyways we can take this change off and make an other PR.
It's up to you to judge if it's worth for a minor change.
|
@twiest LGTM |
|
👎 Still breaks node labels |
|
@wshearn what do we expect for node's labels ? When the variable |
roles/openshift_node/tasks/main.yml
Outdated
There was a problem hiding this comment.
As @wshearn noted this breaks node labels, should be
labels: "{{ lookup('oo_option', 'openshift_node_labels') | default( openshift_node_labels | default(none) ) }}"
There was a problem hiding this comment.
Nevermind, that doesn't work either.
There was a problem hiding this comment.
labels: "{{ lookup('oo_option', 'openshift_node_labels') | default( openshift_node_labels | default(none) , true) }}"
With @twiest 's adivce, what do you think about this ?
|
This is a recently built cluster: Both of these clusters were built in AWS and not GCE. |
|
oo_option returns an empty array, even empty the variable is defined right ? If this is the case, giving priority to the variable openshift_node_labels should resolve this issue. I will check it tomorrow at office |
|
@menren To replace an empty array (or anything that evaluates to "false" in python), pass a second parameter to default like this: In this case, my_default will replace the empty list. For more information, see our best practices guide: |
|
@twiest thank you for sharing knowledge ! |
…_labels when oo_option returns an empty list
|
@wshearn However this choice may be discussed : What is your opinion ? |
There was a problem hiding this comment.
Per the best practices guide, we should always pass in "true" as the second param of default, unless we're dealing with boolean values.
So, this should be:
infra_names: "{{ infra_names_output.results | default([], true)
Best practices guide:
https://github.com/openshift/openshift-ansible/blob/master/docs/best_practices_guide.adoc#filters
There was a problem hiding this comment.
pass in true for both default calls (same as above)
|
ok to test |
|
@twiest All the default mentionned have second param. as true now. |
|
ok to test |
|
This LGTM. Waiting on @wshearn to see if the problem he was seeing has been fixed. |
There was a problem hiding this comment.
@menren hey, sorry for missing this earlier, but I just noticed this.
So we use infra nodes, why is this commented out?
We want it like the AWS playbook which has this section in.
There was a problem hiding this comment.
We use set_node_launch_facts_tasks.yml for infra_node (https://github.com/openshift/openshift-ansible/blob/master/playbooks/gce/openshift-cluster/launch.yml#L31) : that's not working obviously, the playbook stop on error while trying to launch infra nodes instances.
I tried to repair it with set_infra_launch_facts_tasks.yml, the instances were correctly launched, however I encountered many issues at that time (in August).
Currently the GCE deployment isn't working at all, with or without infra-node. I suppose nobody is working with it. If somebody is working with it, he/she has to tell me how it can work in the current state.
By commenting this code, the rest is working.
We have to wait an other patch in order to make the infra-node work.
This PR fixes the standard deployment without infra and will allow people to work on GCE deployment and repair the infra-node
There was a problem hiding this comment.
Ah, I see. I just tried and I was able to launch by making the infra section look the same on gce as it does in aws.
So, it now looks like this in my branch:
- include: ../../common/openshift-cluster/set_node_launch_facts_tasks.yml
vars:
type: "infra"
count: "{{ num_infra }}"
- include: tasks/launch_instances.yml
vars:
instances: "{{ node_names }}"
cluster: "{{ cluster_id }}"
type: "{{ k8s_type }}"
g_sub_host_type: "{{ sub_host_type }}"
- add_host:
name: "{{ master_names.0 }}"
groups: service_master
when: master_names is defined and master_names.0 is defined
Locally, I also removed this file as it's no longer being used:
playbooks/common/openshift-cluster/set_infra_launch_facts_tasks.yml
I'm ok if we get this as a separate PR as I have some other things I had to patch to be able to launch a cluster in GCE. I'll @ mention you when I create my PR to make sure it works for you too.
There was a problem hiding this comment.
@twiest good if you can repair the infra nodes for GCE because I work without it and don't know how it works exactly
|
👍 |
|
@wshearn Thank you for the test and the thumb |
|
Merging because major issues have been addressed. We'll fix the infra node issue in a separate PR. |
|
@menren great job on this PR. Thank you for your tireless efforts to make our GCE support better. |
Hello,
The file that has been merged by error is reverted to the previous and correct version : playbooks/openstack/openshift-cluster/launch.yml
The other file that impacts Openstack is nova.py. The modification is a fix.
Now openstack deployment can be launched from a directory different than openshift-ansible.
This code successfully deploys clusters on openstack and it seems to be working well with or without infra node.
Thank you