Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

check api resources before install proxy #1210

Merged
merged 2 commits into from
Aug 31, 2018
Merged

Conversation

YitongFeng
Copy link
Contributor

Related issue #1153

@YitongFeng YitongFeng requested review from hao1939 and ydye August 30, 2018 04:13
@coveralls
Copy link

coveralls commented Aug 30, 2018

Coverage Status

Coverage increased (+1.03%) to 77.059% when pulling e26bcf6 on yife/check_resource into 21ca648 on master.

@@ -197,6 +197,9 @@ def run(self):
kubectl_install_instance = kubectl_install.kubectl_install(self.cluster_config)
kubectl_install_instance.run()

# check the registerd api resources
common.execute_shell("kubectl api-resources", "kubectl command failed!")
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you should retry util successful

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point

common.execute_shell_retry("kubectl api-resources", "kubectl command failed!", 5)

# create kube-proxy until daemonset resource is registerd
common.execute_shell_retry("kubectl api-resources | grep -q daemonsets", "Controller manager hasn't create daemonset object!", 5)
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Will kubectl api-resources | grep -q daemonsets return none zero when daemonsets not ready?
  2. Does the grep -q case-sensitive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, only when it grep nothing it return 0, I have test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

kubectl api-resources results are all lowercase, the "grep" is case-sensitive

@hao1939
Copy link
Contributor

hao1939 commented Aug 30, 2018

Fixes #1153

@hao1939 hao1939 force-pushed the yife/check_resource branch 3 times, most recently from a8c4ec7 to 52d0832 Compare August 31, 2018 02:51
@hao1939 hao1939 force-pushed the yife/check_resource branch from 52d0832 to e26bcf6 Compare August 31, 2018 03:02
@YitongFeng YitongFeng merged commit 4da827a into master Aug 31, 2018
@YitongFeng YitongFeng deleted the yife/check_resource branch August 31, 2018 03:06
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.

5 participants