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

Fix 8105 handle previous PF export file version (11.x, 12.x and 13.0 ) #8193

Merged
merged 5 commits into from
Aug 5, 2024

Conversation

JeGoi
Copy link
Contributor

@JeGoi JeGoi commented Jun 25, 2024

Description

Should fix 8105 for version previous 13.1 that have the export with complete path.

Impacts

Fix import in 13.2 and after

Issue

fixes #8105

Delete branch after merge

YES

NEED TO BE BACK PORTED TO 13.2 AND 13.1

@JeGoi JeGoi added this to the +1 (patch release) milestone Jun 25, 2024
@JeGoi JeGoi requested review from lzammit and abprasa June 25, 2024 17:17
@JeGoi
Copy link
Contributor Author

JeGoi commented Jun 25, 2024

From 13.1 in 13.2

root@172-234-128-119:/usr/local/pf# bin/pfcmd version
PacketFence 13.2.0
root@172-234-128-119:~# /usr/local/pf/addons/full-import/import.sh -f /tmp/export.tgz
/tmp/tmp.GWJ14ydmoL ~
=================================================================================
Extracting archive...
Found the following content in the archive:
total 336556
-rw-r--r-- 1 root root       519 Jun 25 17:49 add_files.txt
-rw-r--r-- 1 root root      1083 Jun 25 17:49 grants.sql
-rw-r--r-- 1 root root    123521 Jun 25 17:49 packetfence-db-dump-2024-06-25_13h49.sql.gz
-rw-r--r-- 1 root root 172833693 Jun 25 17:49 packetfence-files-dump-2024-06-25_13h48.tgz
-rw-r--r-- 1 root root      1630 Jun 25 17:49 stored_config_files.txt
drwxr-xr-x 3 root root      4096 Jun 25 17:49 usr
=================================================================================
Found files dump 'packetfence-files-dump-2024-06-25_13h48.tgz'
Extracting files dump
=================================================================================
Found compressed database dump 'packetfence-db-dump-2024-06-25_13h49.sql.gz'
Uncompressed database dump 'packetfence-db-dump-2024-06-25_13h49.sql'
=================================================================================
Get PF version in PacketFence export
13.1.0
=================================================================================
Stopping PacketFence services
Synchronizing state of monit.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable monit

From 12.2 to 13.2:

root@172-234-128-119:/usr/local/pf# bin/pfcmd version
PacketFence 13.2.0
root@172-234-128-119:/usr/local/pf# /usr/local/pf/addons/full-import/import.sh -f /tmp/export.tgz
/tmp/tmp.Q2VeE4hmNe /usr/local/pf
=================================================================================
Extracting archive...
Found the following content in the archive:
total 199100
-rw-r--r-- 1 root root       519 Jun 25 16:24 add_files.txt
-rw-r--r-- 1 root root      1083 Jun 25 16:24 grants.sql
-rw-r--r-- 1 root root    107499 Jun 25 16:15 packetfence-db-dump-2024-06-25_12h15.sql.gz
-rw-r--r-- 1 root root 102269720 Jun 25 16:15 packetfence-files-dump-2024-06-25_12h14.tgz
-rw-r--r-- 1 root root      1640 Jun 25 16:24 stored_config_files.txt
drwxr-xr-x 3 root root      4096 Jun 25 16:24 usr
=================================================================================
Found files dump 'packetfence-files-dump-2024-06-25_12h14.tgz'
Extracting files dump
Your version is comming from Packetfence < 13.1
=================================================================================
Found compressed database dump 'packetfence-db-dump-2024-06-25_12h15.sql.gz'
Uncompressed database dump 'packetfence-db-dump-2024-06-25_12h15.sql'
=================================================================================
Get PF version in PacketFence export
12.2.0
=================================================================================
Stopping PacketFence services
Synchronizing state of monit.service with SysV service script with /lib/systemd/systemd-sysv-install.

@JeGoi JeGoi changed the title Fix 8105 for previous pf version of PF Fix 8105 handle previous export file version of PF Jun 25, 2024
@JeGoi JeGoi changed the title Fix 8105 handle previous export file version of PF Fix 8105 handle previous PF export file version (11.x, 12.x and 13.0 ) Jun 25, 2024
@JeGoi
Copy link
Contributor Author

JeGoi commented Jun 25, 2024

Export 13.1 to 13.1 will not work at that point.
13.1 is in between, has the same export as 13.2 but as the previous import.
Backport this is needed for 13.2 and 13.1

@Intrudr-Sec
Copy link

I have the same issue and i'm glad to see this would be fix soon. Do you have any ETA ?

@fdurand fdurand merged commit 9645036 into devel Aug 5, 2024
14 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.

export import script is broken
3 participants