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

Remove deprecated 'enable-cri' flag in kubernetes 1.7 #1408

Merged
merged 4 commits into from
Jul 11, 2017

Conversation

amitkumarj441
Copy link
Contributor

Signed-off-by: Amit Kumar Jaiswal amitkumarj441@gmail.com

Signed-off-by: Amit Kumar Jaiswal <amitkumarj441@gmail.com>
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jul 2, 2017
@@ -13,7 +13,7 @@ KUBELET_HOSTNAME="--hostname-override={{ ansible_hostname }}"
--pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }} \
--kube-reserved cpu={{ kubelet_cpu_limit }},memory={{ kubelet_memory_limit|regex_replace('Mi', 'M') }} \
--node-status-update-frequency={{ kubelet_status_update_frequency }} \
{% if kube_version | version_compare('v1.6', '>=') %}
{% if kube_version | version_compare('v1.7', '>=') %}
--enable-cri={{ kubelet_enable_cri }} --cgroups-per-qos={{ kubelet_cgroups_per_qos }} \
Copy link
Contributor

Choose a reason for hiding this comment

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

this won't work. enable-cri was removed in 1.7.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@matlockx But as I tested, adding a kube_version check for --enable-cri was enough to upgrade to 1.7.0 using upgrade-cluster (with default options).

Copy link
Contributor

Choose a reason for hiding this comment

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

interesting. i just tested it and kubelet service failed to start with 'Error: unknown flag: --enable-cri'. maybe you haven't changed the version to 1.7.0? because the check just excludes the block from being used if your version is still 1.6.* and on top of that it does not make sense to me to change the check like that. i think it should be something like

{% if kube_version | version_compare('v1.6', '>=') %}
{# flag got removed with 1.7.0 #}
{% if kube_version | version_compare('v1.7', '<') %}
--enable-cri={{ kubelet_enable_cri }}
{% endif %}

what does kubectl version say on your cluster.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@amitkumarj441 amitkumarj441 Jul 3, 2017

Choose a reason for hiding this comment

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

@matlockx Alright. On my cluster kubectl version is 1.5.6 and you're right with your suggestion.

Thanks for reminding me 😀 !

Can I update the changes you suggested above?

Copy link
Contributor

Choose a reason for hiding this comment

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

sure. but i'm not a maintainer, so it has to go through review by one of them anyhow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay @matlockx ! Just updated it.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 3, 2017
@@ -14,6 +14,8 @@ KUBELET_HOSTNAME="--hostname-override={{ ansible_hostname }}"
--kube-reserved cpu={{ kubelet_cpu_limit }},memory={{ kubelet_memory_limit|regex_replace('Mi', 'M') }} \
--node-status-update-frequency={{ kubelet_status_update_frequency }} \
{% if kube_version | version_compare('v1.6', '>=') %}
{# flag got removed with 1.7.0 #}
{% if kube_version | version_compare('v1.7', '<') %}
--enable-cri={{ kubelet_enable_cri }} --cgroups-per-qos={{ kubelet_cgroups_per_qos }} \
Copy link
Contributor

Choose a reason for hiding this comment

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

you forgot the closing endif, it must be:

{% if kube_version | version_compare('v1.6', '>=') %}
{# flag got removed with 1.7.0 #}
{% if kube_version | version_compare('v1.7', '<') %}
--enable-cri={{ kubelet_enable_cri }} \
{% endif %}
--cgroups-per-qos={{ kubelet_cgroups_per_qos }} \

Copy link
Contributor

Choose a reason for hiding this comment

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

anyhow, you should double check the file after the jinja2 replacements. i haven't checked it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @matlockx for pointing this out.

Copy link
Contributor

Choose a reason for hiding this comment

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

you are welcome

Updated with closing endif.
@matlockx
Copy link
Contributor

matlockx commented Jul 3, 2017

ci check this

@hzamani hzamani mentioned this pull request Jul 5, 2017
@rsmitty
Copy link
Contributor

rsmitty commented Jul 6, 2017

ci check this

@matlockx
Copy link
Contributor

matlockx commented Jul 6, 2017

@rsmitty i see, you got the ci super power :)

@matlockx
Copy link
Contributor

ok, how do you read the ci result? https://gitlab.com/kargo-ci/kubernetes-incubator__kubespray/pipelines/9534059 says 'passed' but it still says here 'failed' and: any other suggestions regarding the change?

@bradbeam bradbeam changed the title Updated Kubernetes version Remove deprecated 'enable-cri' flag in kubernetes 1.7 Jul 10, 2017
@bradbeam
Copy link
Contributor

It's just the webhooks being dumb, CI passed

@matlockx
Copy link
Contributor

can we merge this?

@rsmitty rsmitty merged commit c75b21a into kubernetes-sigs:master Jul 11, 2017
@matlockx
Copy link
Contributor

matlockx commented Jul 11, 2017

awesome! thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants