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
53859b03
Commit
53859b03
authored
Feb 26, 2016
by
Fabio Yeon
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #22067 from derekwaynecarr/ns_controller_errors
e2e flake fix: Namespace controller error handling improvements
parents
9eed3200
a301a256
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
namespace_controller.go
pkg/controller/namespace/namespace_controller.go
+5
-0
namespace_controller_utils.go
pkg/controller/namespace/namespace_controller_utils.go
+6
-0
No files found.
pkg/controller/namespace/namespace_controller.go
View file @
53859b03
...
...
@@ -112,11 +112,16 @@ func (nm *NamespaceController) worker() {
if
err
:=
nm
.
syncNamespaceFromKey
(
key
.
(
string
));
err
!=
nil
{
if
estimate
,
ok
:=
err
.
(
*
contentRemainingError
);
ok
{
go
func
()
{
defer
utilruntime
.
HandleCrash
()
t
:=
estimate
.
Estimate
/
2
+
1
glog
.
V
(
4
)
.
Infof
(
"Content remaining in namespace %s, waiting %d seconds"
,
key
,
t
)
time
.
Sleep
(
time
.
Duration
(
t
)
*
time
.
Second
)
nm
.
queue
.
Add
(
key
)
}()
}
else
{
// rather than wait for a full resync, re-add the namespace to the queue to be processed
nm
.
queue
.
Add
(
key
)
utilruntime
.
HandleError
(
err
)
}
}
}()
...
...
pkg/controller/namespace/namespace_controller_utils.go
View file @
53859b03
...
...
@@ -244,6 +244,12 @@ func syncNamespace(kubeClient clientset.Interface, versions *unversioned.APIVers
// we have removed content, so mark it finalized by us
result
,
err
:=
retryOnConflictError
(
kubeClient
,
namespace
,
finalizeNamespaceFunc
)
if
err
!=
nil
{
// in normal practice, this should not be possible, but if a deployment is running
// two controllers to do namespace deletion that share a common finalizer token it's
// possible that a not found could occur since the other controller would have finished the delete.
if
errors
.
IsNotFound
(
err
)
{
return
nil
}
return
err
}
...
...
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