Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from oVirt:master #16

Merged
merged 1 commit into from
May 27, 2024
Merged

[pull] master from oVirt:master #16

merged 1 commit into from
May 27, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented May 27, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

When creation of a snapshot for the HybridBackup fails, we end up with a
null pointer exception.

2024-04-17 10:29:48,296+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-2) [76e81a20-4d1d-441b-8e6c-90f37889cd66] EVENT_ID: USER_FAILED_CREATE_SNAPSHOT(117), Failed to create Snapshot Auto-generated for Backup VM for VM xxxxx (User: admin@internal-authz).
2024-04-17 10:29:48,298+02 INFO  [org.ovirt.engine.core.bll.storage.backup.HybridBackupCommand] (default task-2) [76e81a20-4d1d-441b-8e6c-90f37889cd66] Change VM '73df70f5-09b0-4f1a-abd8-2d0b4cd5e8b2' backup 'null' phase from 'null' to 'FAILED'
2024-04-17 10:29:48,299+02 ERROR [org.ovirt.engine.core.bll.storage.backup.HybridBackupCommand] (default task-2) [76e81a20-4d1d-441b-8e6c-90f37889cd66] Command 'org.ovirt.engine.core.bll.storage.backup.HybridBackupCommand' failed: null
2024-04-17 10:29:48,299+02 ERROR [org.ovirt.engine.core.bll.storage.backup.HybridBackupCommand] (default task-2) [76e81a20-4d1d-441b-8e6c-90f37889cd66] Exception: java.lang.NullPointerException
	at org.ovirt.engine.core.dal//org.ovirt.engine.core.dao.VmBackupDaoImpl.update(VmBackupDaoImpl.java:90)
	at org.ovirt.engine.core.dal//org.ovirt.engine.core.dao.VmBackupDaoImpl.update(VmBackupDaoImpl.java:22)
	at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.storage.backup.StartVmBackupCommand.updateVmBackupPhase(StartVmBackupCommand.java:632)
	at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.storage.backup.HybridBackupCommand.executeCommand(HybridBackupCommand.java:118)
	at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1174)
	at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1332)

This happens because VmBackupDaoImpl tries to save the BackupType into
the database (entity.getBackupType().getName()), but that value is still
null.
The BackupType is only set when calling createVmBackup.

But as we already have all the data except the snapshotId at the start
of the HybridBackup, we already call createVmBackup before creating the
snapshot and when the snapshot was created, we add it to the VmBackup
data.

This avoids the null getBackupType()

Signed-off-by: Jean-Louis Dupond <[email protected]>
@pull pull bot added the ⤵️ pull label May 27, 2024
@pull pull bot merged commit ed023e5 into woakes070048:master May 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant