C-bak configure more than one worker issue

Bug #1945571 reported by ZhaoYixin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Incomplete
Medium
Unassigned

Bug Description

C-bak service with multiple workers(e.g. backup_workers=5).

when multiple backups are created concurrently, one of the workers exited abnormally and the child process was respawned. Because the process_number was not 1, _cleanup_incomplete_backup_operations function was not executed.

As a result, the backup status on this worker could not be changed from creating to error. In the same way, restore has the same problem.

```
# backup/manager.py

    @utils.synchronized('cleanup_incomplete_backups_%s' % SERVICE_PGRP,
                        external=True, delay=0.1)
    def _cleanup_incomplete_backup_operations(self, ctxt):
        # Only the first launched process should do the cleanup, the others
        # have waited on the lock for the first one to finish the cleanup and
        # can now continue with the start process.
        if self._process_number != 1:
            LOG.debug("Process #%s %sskips cleanup.",
                      self._process_number,
                      '(pgid=%s) ' % SERVICE_PGRP if SERVICE_PGRP else '')
            return

        LOG.info("Cleaning up incomplete backup operations.")
        ......
```

Changed in cinder:
importance: Undecided → High
importance: High → Medium
tags: added: worker
Revision history for this message
Sofia Enriquez (lsofia-enriquez) wrote :

Greetings,
Do you mind adding more details so we can reproduce:
- cinder version
- backup driver
Thanks in advance,
Sofia

Changed in cinder:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.