Problems with unpacking package

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with unpacking package

Yevhenii Kurtov
Hi everyone,

I'm having problem with unpacking release_handler:unpack_release .
Looking at  https://github.com/erlang/otp/blob/maint-21/lib/sasl/src/release_handler.erl#L850-L854 I understand that it's supposed to copy and  `releases/app_name.rel` into `releases/<vsn>/app_name.rel` and then delete the origin file.

Somehow it doesn't work in my case:

- releases/<vsn>/app_name.rel is already present in an archive
- releases/<vsn>/app_name.rel is not there after upgrade
- releases/app_name.rel still there

Illustration:

$ mkdir /srv/apps/flowmail_web/releases/1.4.6+5aead53/
$ mv flowmail_web_1.4.6+5aead53.upgrade.tar.gz /srv/apps/flowmail_web/releases/1.4.6+5aead53/flowmail_web.tar.gz
$ ./bin/flowmail_web upgrade 1.4.6+5aead53
Release flowmail_web:1.4.6+5aead53 not found, attempting to unpack releases/1.4.6+5aead53/flowmail_web.tar.gz
Unpacked '1.4.6+5aead53' successfully!
Release flowmail_web:1.4.6+5aead53 is already unpacked, installing..
Installed release flowmail_web:1.4.6+5aead53
Updating config..
Made release flowmail_web:1.4.6+5aead53 permanent
$ ./bin/flowmail_web ping
grep: /srv/apps/flowmail_web/releases/1.4.6+5aead53/flowmail_web.rel: No such file or directory
grep: /srv/apps/flowmail_web/releases/1.4.6+5aead53/flowmail_web.rel: No such file or directory
pong

## but it's present in an archive

$ tar -C /tmp/5aead53/ -zxvf releases/1.4.6+5aead53/flowmail_web_1.4.6+5aead53.tar.gz
$ [ -f /tmp/5aead53/releases/1.4.6+5aead53/flowmail_web.rel ] && echo "File exist" || echo "File does not exist"
File exist
$ [ -f releases/flowmail_web.rel ] && echo "File exist" || echo "File does not exist"
File exist


There are no any special file permissions or anything like that


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Problems with unpacking package

PAILLEAU Eric

Hi,

Looks like error is raised by grep. + is a special character for grep. Can you look at those grep line?

Envoyé depuis mon mobile



---- Yevhenii Kurtov a écrit ----

Hi everyone,

I'm having problem with unpacking release_handler:unpack_release .
Looking at  https://github.com/erlang/otp/blob/maint-21/lib/sasl/src/release_handler.erl#L850-L854 I understand that it's supposed to copy and  `releases/app_name.rel` into `releases/<vsn>/app_name.rel` and then delete the origin file.

Somehow it doesn't work in my case:

- releases/<vsn>/app_name.rel is already present in an archive
- releases/<vsn>/app_name.rel is not there after upgrade
- releases/app_name.rel still there

Illustration:

$ mkdir /srv/apps/flowmail_web/releases/1.4.6+5aead53/
$ mv flowmail_web_1.4.6+5aead53.upgrade.tar.gz /srv/apps/flowmail_web/releases/1.4.6+5aead53/flowmail_web.tar.gz
$ ./bin/flowmail_web upgrade <a href="tel:1.4.6">1.4.6+5aead53
Release flowmail_web:<a href="tel:1.4.6">1.4.6+5aead53 not found, attempting to unpack releases/1.4.6+5aead53/flowmail_web.tar.gz
Unpacked '<a href="tel:1.4.6">1.4.6+5aead53' successfully!
Release flowmail_web:<a href="tel:1.4.6">1.4.6+5aead53 is already unpacked, installing..
Installed release flowmail_web:<a href="tel:1.4.6">1.4.6+5aead53
Updating config..
Made release flowmail_web:<a href="tel:1.4.6">1.4.6+5aead53 permanent
$ ./bin/flowmail_web ping
grep: /srv/apps/flowmail_web/releases/1.4.6+5aead53/flowmail_web.rel: No such file or directory
grep: /srv/apps/flowmail_web/releases/1.4.6+5aead53/flowmail_web.rel: No such file or directory
pong

## but it's present in an archive

$ tar -C /tmp/5aead53/ -zxvf releases/1.4.6+5aead53/flowmail_web_1.4.6+5aead53.tar.gz
$ [ -f /tmp/5aead53/releases/1.4.6+5aead53/flowmail_web.rel ] && echo "File exist" || echo "File does not exist"
File exist
$ [ -f releases/flowmail_web.rel ] && echo "File exist" || echo "File does not exist"
File exist


There are no any special file permissions or anything like that


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Problems with unpacking package

Mikael Pettersson-5
Where's that "grep" coming from?  You might need to tell it to treat the filename as fixed, i.e. use "grep -F" or "fgrep" instead.

On Tue, Aug 14, 2018 at 10:22 AM, Eric Pailleau <[hidden email]> wrote:

Hi,

Looks like error is raised by grep. + is a special character for grep. Can you look at those grep line?

Envoyé depuis mon mobile



---- Yevhenii Kurtov a écrit ----


Hi everyone,

I'm having problem with unpacking release_handler:unpack_release .
Looking at  https://github.com/erlang/otp/blob/maint-21/lib/sasl/src/release_handler.erl#L850-L854 I understand that it's supposed to copy and  `releases/app_name.rel` into `releases/<vsn>/app_name.rel` and then delete the origin file.

Somehow it doesn't work in my case:

- releases/<vsn>/app_name.rel is already present in an archive
- releases/<vsn>/app_name.rel is not there after upgrade
- releases/app_name.rel still there

Illustration:

$ mkdir /srv/apps/flowmail_web/releases/1.4.6+5aead53/
$ mv flowmail_web_1.4.6+5aead53.upgrade.tar.gz /srv/apps/flowmail_web/releases/1.4.6+5aead53/flowmail_web.tar.gz
$ ./bin/flowmail_web upgrade <a href="tel:1.4.6" target="_blank">1.4.6+5aead53
Release flowmail_web:<a href="tel:1.4.6" target="_blank">1.4.6+5aead53 not found, attempting to unpack releases/1.4.6+5aead53/flowmail_web.tar.gz
Unpacked '<a href="tel:1.4.6" target="_blank">1.4.6+5aead53' successfully!
Release flowmail_web:<a href="tel:1.4.6" target="_blank">1.4.6+5aead53 is already unpacked, installing..
Installed release flowmail_web:<a href="tel:1.4.6" target="_blank">1.4.6+5aead53
Updating config..
Made release flowmail_web:<a href="tel:1.4.6" target="_blank">1.4.6+5aead53 permanent
$ ./bin/flowmail_web ping
grep: /srv/apps/flowmail_web/releases/1.4.6+5aead53/flowmail_web.rel: No such file or directory
grep: /srv/apps/flowmail_web/releases/1.4.6+5aead53/flowmail_web.rel: No such file or directory
pong

## but it's present in an archive

$ tar -C /tmp/5aead53/ -zxvf releases/1.4.6+5aead53/flowmail_web_1.4.6+5aead53.tar.gz
$ [ -f /tmp/5aead53/releases/1.4.6+5aead53/flowmail_web.rel ] && echo "File exist" || echo "File does not exist"
File exist
$ [ -f releases/flowmail_web.rel ] && echo "File exist" || echo "File does not exist"
File exist


There are no any special file permissions or anything like that


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions