Skip to content

Restore aborts when setting NethVoice Hotel configuration #8090

Description

@Stell0

Restoring a NethVoice backup can abort during restore-module/70configure_module when the script calls set-nethvoice-hotel through agent.tasks.run(). The same action works when executed from outside with api-cli, but fails from the module context with 403 Forbidden.

This prevents the following restore steps from running, including SIP/SIPS port adjustment and service reload.

Steps to reproduce

  1. Restore a NethVoice backup from version <= 1.7.0.
  2. Let the restore reach restore-module/70configure_module.
  3. The script calls set-nethvoice-hotel with a valid payload through agent.tasks.run().
  4. Check the restore result and logs.

Expected behavior

The set-nethvoice-hotel action is authorized from the module context and the restore completes all post-restore steps.

Actual behavior

The set-nethvoice-hotel action fails with 403 Forbidden, causing restore-module to abort at step 70configure_module.

Traceback (most recent call last):
  File "/home/nethvoice1/.config/actions/restore-module/70configure_module", line 33, in <module>
    response = agent.tasks.run(agent_id=os.environ['AGENT_ID'], action='set-nethvoice-hotel', data={
  File "/usr/local/agent/pypkg/agent/tasks/apiclient.py", line 246, in _apost_task
    async with client.post(
  File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/aiohttp/client_reqrep.py", line 629, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url='http://cluster-leader:9311/api/module/nethvoice1/tasks'

task/module/nethvoice1/xxxxxxxx-xxx-xxxx-xxxx-xxxxxxxxxxx: action "restore-module" status is "aborted" (1) at step 70configure_module

See also

Metadata

Metadata

Assignees

Labels

nethvoiceBug or features releted to the NethVoice project

Type

Fields

No fields configured for Bug.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions