Commit Graph

12 Commits

Author SHA1 Message Date
Niels de Vos
6df173dbf3 journal: only destroy the connection if it is set
Prevent re-use of a destroyed connection by setting it to `nil`. This
way it is also safe to call `Destroy()` multiple times without causing a
panic.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-10-14 14:54:29 +00:00
Praveen M
e150fd986b journal: fix empty csiCreationTimeKey value
This commit fixes the issue where the `csiCreationTimeKey`
field was missing during the rebuilding of the
`VolumeGroupJournalConfig` struct in the `Connect()` method,
which led to the `csi.creationtime` key not being stored in
the omap.

Signed-off-by: Praveen M <m.praveen@ibm.com>
2024-08-13 07:22:26 +00:00
Niels de Vos
503d10eb1a journal: store CreationTime for VolumeGroups
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-08-09 14:58:59 +00:00
Niels de Vos
435e26d948 cleanup: make VolumeGroupJournalConnection a private type
VolumeGroupJournalConnection is not used outside the internal/journal
package. There is no need to expose the type outside of the package, it
causes only confusion about the usage of the journalling API.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-07-24 15:55:07 +00:00
Niels de Vos
6b5ef1d76a journal: remove unused parameter journalPoolID from ReserveName()
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-07-08 09:23:58 +00:00
Madhu Rajanna
f8fbf2e95a journal: add volumeMap to the group
instead of adding single volumes to the
group journal, support adding multiple
volumeID's map to the group journal
which is required for RBD as well.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-06-20 12:22:35 +00:00
Madhu Rajanna
fc0a7d2542 journal: support removing multiple volumeID
Updating the code to support removing
multiple volumeID's mapping from the
group journal.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-06-20 12:22:35 +00:00
Madhu Rajanna
f346f3d201 journal: remove snapshot specific name from group
Adjusted method names to not have any
specific things to volumesnapshot as
we want to reuse the same journal for
volumegroup as well.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-06-20 12:22:35 +00:00
Madhu Rajanna
68e93a31cc journal: fix connection problem with groupjournal
Same group jounral config need to be reused
for multiple connection where different monitors
and users are used, for that reason create a unique
connection each time.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-03-21 06:16:42 +00:00
Niels de Vos
c32dfc0ae6 cleanup: correct typo in NewCSIVolumeroupJournal() function
The name of the function should be `NewCSIVolumeGroupJournal()`.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-03-15 11:05:10 +00:00
Niels de Vos
32de26828f cleanup: don't return an internal type from VolumeGroupJournal.Connect()
The VolumeGroupJournal interface does not need to return anything except
for a potential error. Any instance that implements the
VolumeGroupJournal interface can be used to call all functions.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-03-14 10:39:36 +00:00
Madhu Rajanna
dd235d88e0 journal: omap implementation for volumegroup
Implement the required function to store/retrieve
the details from the omap for the volumegroup.

This adds a new omap object that contains the
mapping of the RequestName and all the volumeID
and its corresponding snapshotID belonging to a
group.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-02-09 07:20:37 +00:00