Skip to content

Commit

Permalink
Merge pull request lxc#4346 from zhongTao99/fix
Browse files Browse the repository at this point in the history
containers in the FREEZING state also need to be unfreeze
  • Loading branch information
stgraber authored Mar 26, 2024
2 parents 632b27b + c02367e commit d887f5e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lxc/lxccontainer.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,10 @@ static bool do_lxcapi_unfreeze(struct lxc_container *c)
return false;

s = lxc_getstate(c->name, c->config_path, 0);
if (s == FROZEN) {
// Prevent lxc from unexpectedly exiting when executing freeze,
// causing the container to be in the FREEZING state,
// making normal life cycle management impossible.
if (s == FROZEN || s == FREEZING) {
ret = cgroup_unfreeze(c->name, c->config_path, -1);
if (ret == -ENOCGROUP2)
ret = lxc_unfreeze(c->lxc_conf, c->name, c->config_path);
Expand Down

0 comments on commit d887f5e

Please sign in to comment.