Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
8616687c
Unverified
Commit
8616687c
authored
Oct 27, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 27, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70282 from justinsb/better_unsupported_provider_messages
Disambiguate "unsupported provider" messages
parents
481fa197
ff8a0e08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
util.go
test/e2e/framework/util.go
+5
-5
No files found.
test/e2e/framework/util.go
View file @
8616687c
...
@@ -3895,7 +3895,7 @@ func ParseKVLines(output, key string) string {
...
@@ -3895,7 +3895,7 @@ func ParseKVLines(output, key string) string {
func
RestartKubeProxy
(
host
string
)
error
{
func
RestartKubeProxy
(
host
string
)
error
{
// TODO: Make it work for all providers.
// TODO: Make it work for all providers.
if
!
ProviderIs
(
"gce"
,
"gke"
,
"aws"
)
{
if
!
ProviderIs
(
"gce"
,
"gke"
,
"aws"
)
{
return
fmt
.
Errorf
(
"unsupported provider: %s"
,
TestContext
.
Provider
)
return
fmt
.
Errorf
(
"unsupported provider
for RestartKubeProxy
: %s"
,
TestContext
.
Provider
)
}
}
// kubelet will restart the kube-proxy since it's running in a static pod
// kubelet will restart the kube-proxy since it's running in a static pod
Logf
(
"Killing kube-proxy on node %v"
,
host
)
Logf
(
"Killing kube-proxy on node %v"
,
host
)
...
@@ -3932,7 +3932,7 @@ func RestartKubelet(host string) error {
...
@@ -3932,7 +3932,7 @@ func RestartKubelet(host string) error {
// TODO: Make it work for all providers and distros.
// TODO: Make it work for all providers and distros.
supportedProviders
:=
[]
string
{
"gce"
,
"aws"
,
"vsphere"
}
supportedProviders
:=
[]
string
{
"gce"
,
"aws"
,
"vsphere"
}
if
!
ProviderIs
(
supportedProviders
...
)
{
if
!
ProviderIs
(
supportedProviders
...
)
{
return
fmt
.
Errorf
(
"unsupported provider: %s, supported providers are: %v"
,
TestContext
.
Provider
,
supportedProviders
)
return
fmt
.
Errorf
(
"unsupported provider
for RestartKubelet
: %s, supported providers are: %v"
,
TestContext
.
Provider
,
supportedProviders
)
}
}
if
ProviderIs
(
"gce"
)
&&
!
NodeOSDistroIs
(
"debian"
,
"gci"
)
{
if
ProviderIs
(
"gce"
)
&&
!
NodeOSDistroIs
(
"debian"
,
"gci"
)
{
return
fmt
.
Errorf
(
"unsupported node OS distro: %s"
,
TestContext
.
NodeOSDistro
)
return
fmt
.
Errorf
(
"unsupported node OS distro: %s"
,
TestContext
.
NodeOSDistro
)
...
@@ -3988,7 +3988,7 @@ func WaitForKubeletUp(host string) error {
...
@@ -3988,7 +3988,7 @@ func WaitForKubeletUp(host string) error {
func
RestartApiserver
(
cs
clientset
.
Interface
)
error
{
func
RestartApiserver
(
cs
clientset
.
Interface
)
error
{
// TODO: Make it work for all providers.
// TODO: Make it work for all providers.
if
!
ProviderIs
(
"gce"
,
"gke"
,
"aws"
)
{
if
!
ProviderIs
(
"gce"
,
"gke"
,
"aws"
)
{
return
fmt
.
Errorf
(
"unsupported provider: %s"
,
TestContext
.
Provider
)
return
fmt
.
Errorf
(
"unsupported provider
for RestartApiserver
: %s"
,
TestContext
.
Provider
)
}
}
if
ProviderIs
(
"gce"
,
"aws"
)
{
if
ProviderIs
(
"gce"
,
"aws"
)
{
initialRestartCount
,
err
:=
getApiserverRestartCount
(
cs
)
initialRestartCount
,
err
:=
getApiserverRestartCount
(
cs
)
...
@@ -4011,7 +4011,7 @@ func RestartApiserver(cs clientset.Interface) error {
...
@@ -4011,7 +4011,7 @@ func RestartApiserver(cs clientset.Interface) error {
func
sshRestartMaster
()
error
{
func
sshRestartMaster
()
error
{
if
!
ProviderIs
(
"gce"
,
"aws"
)
{
if
!
ProviderIs
(
"gce"
,
"aws"
)
{
return
fmt
.
Errorf
(
"unsupported provider: %s"
,
TestContext
.
Provider
)
return
fmt
.
Errorf
(
"unsupported provider
for sshRestartMaster
: %s"
,
TestContext
.
Provider
)
}
}
var
command
string
var
command
string
if
ProviderIs
(
"gce"
)
{
if
ProviderIs
(
"gce"
)
{
...
@@ -4077,7 +4077,7 @@ func getApiserverRestartCount(c clientset.Interface) (int32, error) {
...
@@ -4077,7 +4077,7 @@ func getApiserverRestartCount(c clientset.Interface) (int32, error) {
func
RestartControllerManager
()
error
{
func
RestartControllerManager
()
error
{
// TODO: Make it work for all providers and distros.
// TODO: Make it work for all providers and distros.
if
!
ProviderIs
(
"gce"
,
"aws"
)
{
if
!
ProviderIs
(
"gce"
,
"aws"
)
{
return
fmt
.
Errorf
(
"unsupported provider: %s"
,
TestContext
.
Provider
)
return
fmt
.
Errorf
(
"unsupported provider
for RestartControllerManager
: %s"
,
TestContext
.
Provider
)
}
}
if
ProviderIs
(
"gce"
)
&&
!
MasterOSDistroIs
(
"gci"
)
{
if
ProviderIs
(
"gce"
)
&&
!
MasterOSDistroIs
(
"gci"
)
{
return
fmt
.
Errorf
(
"unsupported master OS distro: %s"
,
TestContext
.
MasterOSDistro
)
return
fmt
.
Errorf
(
"unsupported master OS distro: %s"
,
TestContext
.
MasterOSDistro
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment