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

Different commands identify instances in a different ways #976

Open
elhimov opened this issue Oct 9, 2024 · 0 comments
Open

Different commands identify instances in a different ways #976

elhimov opened this issue Oct 9, 2024 · 0 comments
Labels
2sp code health Improve code readability, simplify maintenance and so on teamE

Comments

@elhimov
Copy link
Contributor

elhimov commented Oct 9, 2024

$ tt start replicaset_example
   • Starting an instance [replicaset_example:master]...
   • Starting an instance [replicaset_example:replica]...
$ tt start replicaset_example
   • The instance replicaset_example:replica (PID = 772688) is already running.
   • The instance replicaset_example:master (PID = 772687) is already running.
$ tt restart -y replicaset_example
   • The Instance replicaset_example:master (PID = 772687) has been terminated.
   • The Instance replicaset_example:replica (PID = 772688) has been terminated.
   • Starting an instance [replicaset_example:master]...
   • Starting an instance [replicaset_example:replica]...
$ tt logrotate replicaset_example
   • replicaset_example:master: logs has been rotated. PID: 777002.
   • replicaset_example:replica: logs has been rotated. PID: 777003.
$ tt clean replicaset_example
   • instance `master` must be stopped
   • instance `replica` must be stopped
$ tt stop replicaset_example
   • The Instance replicaset_example:master (PID = 777002) has been terminated.
   • The Instance replicaset_example:replica (PID = 777003) has been terminated.
$ tt clean -f replicaset_example
   • List of files to delete:

   • /var/log/tarantool/sys_env/replicaset_example/replica/tt.log
   • /var/lib/tarantool/sys_env/replicaset_example/replica/00000000000000000009.snap
   • /var/lib/tarantool/sys_env/replicaset_example/replica/00000000000000000009.xlog
   • replica: cleaning...	[OK]
   • List of files to delete:

   • /var/log/tarantool/sys_env/replicaset_example/master/tt.log
   • /var/lib/tarantool/sys_env/replicaset_example/master/00000000000000000000.snap
   • /var/lib/tarantool/sys_env/replicaset_example/master/00000000000000000000.xlog
   • /var/lib/tarantool/sys_env/replicaset_example/master/00000000000000000009.xlog
   • master: cleaning...	[OK] 
$ tt start replicaset_example
   • Starting an instance [replicaset_example:master]...
   • Starting an instance [replicaset_example:replica]...
$ tt kill -f replicaset_example
   • The instance replicaset_example:master (PID = 805812) has been killed.
   • The instance replicaset_example:replica (PID = 805813) has been killed.
$ tt kill -f replicaset_example
   • failed to kill the processes: can't get pid of running process: can't "stat" the PID file. Error: stat /var/run/tarantool/sys_env/replicaset_example/master/tt.pid: no such file or directory
   • failed to kill the processes: can't get pid of running process: can't "stat" the PID file. Error: stat /var/run/tarantool/sys_env/replicaset_example/replica/tt.pid: no such file or directory
$ tt logrotate replicaset_example
   ⨯ NOT RUNNING

In the above output various formats of instances can be found:

  • [app:inst] - start (when not running), restart (starting section)
  • app:inst - start, logrotate and kill (when running), stop, restart (stop section)
  • inst - clean (when running)
  • `inst` - clean (when not running)
  • no instances at all - logrotate and kill (when not running)

Instances should be identified uniformly, for example in [app:instance] format.

@oleg-jukovec oleg-jukovec added 2sp code health Improve code readability, simplify maintenance and so on teamE and removed 2sp labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2sp code health Improve code readability, simplify maintenance and so on teamE
Projects
None yet
Development

No branches or pull requests

2 participants