Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v2] build: don't start example instance in postinstall
@ 2020-06-09 11:40 Olga Arkhangelskaia
  2020-06-10 12:39 ` Alexander Turenko
  2020-06-10 12:39 ` Igor Munkin
  0 siblings, 2 replies; 4+ messages in thread
From: Olga Arkhangelskaia @ 2020-06-09 11:40 UTC (permalink / raw)
  To: tarantool-patches; +Cc: alexander.turenko

After tarantool installation on Debian/Ubuntu from repo, example instance
was automatically started on 3301 port. At the same time example instance
on RHEL/CentOS is started manually. Patch does the same for Debian/Ubuntu.

If tarantool is installed not for the first time,
do "apt-get purge tarantool-common" before installation to get rid of link in
/etc/tarantool/instances.enabled.

Closes #4507
---
Brabch: gh-4507-disable-start-example-instance-full-ci
@ChangeLog:
- disabled start of example instance after installing from Debian/Ubuntu
  repo.
If there is no installed version of tarantool-common, one should do
"apt-get install tarantool-common".
If tarantool-common was installed before, and even removed,
installation or upgrade won't take effect, because the link to example
instance still present in /etc/tarantool/instances.enabled.
Do following steps to get rid from example instance starting every time:
"apt-get purge tarantool-common"
"apt-get install tarantool-common"

 debian/tarantool-common.postinst  | 8 --------
 extra/dist/tarantool-generator.in | 1 +
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/debian/tarantool-common.postinst b/debian/tarantool-common.postinst
index e2eda3415..03e4b2215 100644
--- a/debian/tarantool-common.postinst
+++ b/debian/tarantool-common.postinst
@@ -22,14 +22,6 @@ case "$1" in
         install -d -o$SYSUSER -gadm -m2750 /var/log/tarantool
         install -d -o$SYSUSER -g$SYSUSER -m750 /var/run/tarantool
         install -d -o$SYSUSER -g$SYSUSER -m750 /var/lib/tarantool
-
-        # Enable example.lua by default
-        if [ -z $2 ] && [ ! -e /etc/tarantool/instances.enabled/example.lua ] &&
-           [ -d /etc/tarantool/instances.enabled ] &&
-           [ -d /etc/tarantool/instances.available/ ]; then
-          ln -s /etc/tarantool/instances.available/example.lua \
-                /etc/tarantool/instances.enabled/example.lua
-        fi
     ;;
 esac
 
diff --git a/extra/dist/tarantool-generator.in b/extra/dist/tarantool-generator.in
index f6a6a2540..2048b7517 100755
--- a/extra/dist/tarantool-generator.in
+++ b/extra/dist/tarantool-generator.in
@@ -13,6 +13,7 @@ mkdir -p "$wantdir"
 
 for file in @TARANTOOL_ENABLEDDIR@/*.lua; do
 	instance=`basename $file .lua`
+	[ "${instance}" = "*" ] && break  # skip empty directory
 	ln -s "$service" "$wantdir/tarantool@$instance.service"
 done
 
-- 
2.20.1 (Apple Git-117)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Tarantool-patches] [PATCH v2] build: don't start example instance in postinstall
  2020-06-09 11:40 [Tarantool-patches] [PATCH v2] build: don't start example instance in postinstall Olga Arkhangelskaia
@ 2020-06-10 12:39 ` Alexander Turenko
  2020-11-09  4:20   ` Alexander Turenko
  2020-06-10 12:39 ` Igor Munkin
  1 sibling, 1 reply; 4+ messages in thread
From: Alexander Turenko @ 2020-06-10 12:39 UTC (permalink / raw)
  To: Olga Arkhangelskaia; +Cc: tarantool-patches

LGTM.

Pushed to master and 2.4. CCed Kirill.

WBR, Alexander Turenko.

On Tue, Jun 09, 2020 at 02:40:36PM +0300, Olga Arkhangelskaia wrote:
> After tarantool installation on Debian/Ubuntu from repo, example instance
> was automatically started on 3301 port. At the same time example instance
> on RHEL/CentOS is started manually. Patch does the same for Debian/Ubuntu.

Nit: Over 72 symbols.

> 
> If tarantool is installed not for the first time,
> do "apt-get purge tarantool-common" before installation to get rid of link in
> /etc/tarantool/instances.enabled.

Note: There is no such sentence in the commit on the branch. However the
commit is okay without it too, so I would not bother much.

> 
> Closes #4507
> ---
> Brabch: gh-4507-disable-start-example-instance-full-ci

I rebased and force-pushed it to verify again (just in case).

https://gitlab.com/tarantool/tarantool/-/pipelines/154589256

release_asan_clang8 fail is the same as on master, so is not related to
the patch. Other jobs are passed.

Removed the branch.

> @ChangeLog:
> - disabled start of example instance after installing from Debian/Ubuntu
>   repo.

Nit: Don't forget to include (gh-xxxx) at the end.

> If there is no installed version of tarantool-common, one should do
> "apt-get install tarantool-common".

'tarantool' package depends on 'tarantool-common', so it is not
necessary. Moreover, when 'tarantool-common' is installed as the
dependency for 'tarantool' package it is marked as 'auto' package and
will be removed by `apt-get autoremove` (or `debfoster`) after removal
of 'tarantool' package. See [1] for more information about autimatic
dependencies.

[1]: https://books.google.com/books?id=xmfTCgAAQBAJ&pg=PA115

> If tarantool-common was installed before, and even removed,
> installation or upgrade won't take effect, because the link to example
> instance still present in /etc/tarantool/instances.enabled.
> Do following steps to get rid from example instance starting every time:
> "apt-get purge tarantool-common"
> "apt-get install tarantool-common"

In order to avoid explicit (re)installation of tarantool-common I would
suggest to stop the instance and remove the symlink manually:

 | # systemctl stop tarantool@example
 | # rm /etc/tarantool/instances.enabled/example.lua

Having everything said above in the mind I added the following entry to
the release notes:

@ChangeLog

- Don't start 'example' instance after installing tarantool (gh-4507).

  Before this release tarantool package for Debian and Ubuntu
  automatically enable and start 'example' instance, which listens on
  the TCP port 3301. Starting from this release the instance file is
  installed to /etc/tarantool/instances.available/example.lua, but is
  not enabled by default and not started anymore. One may perform the
  following actions to enable and start it:

  ```
  # ln -s /etc/tarantool/instances.available/example.lua \
        /etc/tarantool/instances.enabled/example.lua
  # systemctl start tarantool@example
  ```

  Existing configuration will not be updated automatically at package
  update, so manual actions are required to stop and disable the
  instance (if it is not needed, of course):

  ```
  # systemctl stop tarantool@example
  # rm /etc/tarantool/instances.enabled/example.lua
  ```

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Tarantool-patches] [PATCH v2] build: don't start example instance in postinstall
  2020-06-09 11:40 [Tarantool-patches] [PATCH v2] build: don't start example instance in postinstall Olga Arkhangelskaia
  2020-06-10 12:39 ` Alexander Turenko
@ 2020-06-10 12:39 ` Igor Munkin
  1 sibling, 0 replies; 4+ messages in thread
From: Igor Munkin @ 2020-06-10 12:39 UTC (permalink / raw)
  To: Olga Arkhangelskaia; +Cc: tarantool-patches, alexander.turenko

Olya,

Thanks for the patch! LGTM, considering Sasha's changes.

On 09.06.20, Olga Arkhangelskaia wrote:
> After tarantool installation on Debian/Ubuntu from repo, example instance
> was automatically started on 3301 port. At the same time example instance
> on RHEL/CentOS is started manually. Patch does the same for Debian/Ubuntu.
> 
> If tarantool is installed not for the first time,
> do "apt-get purge tarantool-common" before installation to get rid of link in
> /etc/tarantool/instances.enabled.
> 
> Closes #4507
> ---

<snipped>

> 

-- 
Best regards,
IM

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Tarantool-patches] [PATCH v2] build: don't start example instance in postinstall
  2020-06-10 12:39 ` Alexander Turenko
@ 2020-11-09  4:20   ` Alexander Turenko
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Turenko @ 2020-11-09  4:20 UTC (permalink / raw)
  To: Olga Arkhangelskaia; +Cc: tarantool-patches

On Wed, Jun 10, 2020 at 03:39:10PM +0300, Alexander Turenko wrote:
> LGTM.
> 
> Pushed to master and 2.4. CCed Kirill.

Pushed to 1.10 as well (1.10.8-14-g47dcd9262).

> @ChangeLog
> 
> - Don't start 'example' instance after installing tarantool (gh-4507).
> 
>   Before this release tarantool package for Debian and Ubuntu
>   automatically enable and start 'example' instance, which listens on
>   the TCP port 3301. Starting from this release the instance file is
>   installed to /etc/tarantool/instances.available/example.lua, but is
>   not enabled by default and not started anymore. One may perform the
>   following actions to enable and start it:
> 
>   ```
>   # ln -s /etc/tarantool/instances.available/example.lua \
>         /etc/tarantool/instances.enabled/example.lua
>   # systemctl start tarantool@example
>   ```
> 
>   Existing configuration will not be updated automatically at package
>   update, so manual actions are required to stop and disable the
>   instance (if it is not needed, of course):
> 
>   ```
>   # systemctl stop tarantool@example
>   # rm /etc/tarantool/instances.enabled/example.lua
>   ```

Added into 1.10.9 release notes draft.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-09  4:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 11:40 [Tarantool-patches] [PATCH v2] build: don't start example instance in postinstall Olga Arkhangelskaia
2020-06-10 12:39 ` Alexander Turenko
2020-11-09  4:20   ` Alexander Turenko
2020-06-10 12:39 ` Igor Munkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox