Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
container-manager
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nomad-lab
container-manager
Commits
3f8e5fd3
Commit
3f8e5fd3
authored
Nov 22, 2018
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix deletion of containers
(was deleting *all* containers after upgrading the client library...)
parent
399d98a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/k8-data.js
app/k8-data.js
+2
-2
No files found.
app/k8-data.js
View file @
3f8e5fd3
...
...
@@ -184,7 +184,7 @@ function getOrCreatePod(podName, repl, shouldCreate, next) {
next
(
error
,
null
)
}
else
if
(
pod
.
status
&&
[
'
Error
'
,
'
Failed
'
,
'
Succeeded
'
].
includes
(
pod
.
status
.
phase
))
{
if
(
shouldCreate
)
{
k8
.
api
.
v1
.
ns
(
config
.
k8component
.
namespace
).
pod
s
.
delete
({
name
:
podName
}
).
then
(
function
(
delResult
)
{
k8
.
api
.
v1
.
ns
(
config
.
k8component
.
namespace
).
pod
(
podName
).
delete
(
).
then
(
function
(
delResult
)
{
logger
.
info
(
`Deleted stopped pod
${
podName
}
to restart it`
)
createPod
(
podName
,
repl
,
next
)
// wait & return 'pod shutting down' instead?
},
function
(
err
)
{
...
...
@@ -327,7 +327,7 @@ function guaranteeResolvePod(repl, res, next){
function
deletePod
(
podName
,
next
)
{
k8
.
api
.
v1
.
ns
(
config
.
k8component
.
namespace
).
pod
s
.
delete
({
name
:
podName
}
).
then
(
function
(
result
)
{
k8
.
api
.
v1
.
ns
(
config
.
k8component
.
namespace
).
pod
(
podName
).
delete
(
).
then
(
function
(
result
)
{
resolveCache
.
set
(
podName
,
undefined
)
logger
.
info
(
`deleted pod
${
podName
}
`
)
next
(
null
,
result
.
body
)
...
...
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