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

Depreciate some lotus-worker commands? #10210

Closed
5 of 15 tasks
Tracked by #10338
rjan90 opened this issue Feb 8, 2023 · 4 comments · Fixed by #10384
Closed
5 of 15 tasks
Tracked by #10338

Depreciate some lotus-worker commands? #10210

rjan90 opened this issue Feb 8, 2023 · 4 comments · Fixed by #10384
Labels
kind/enhancement Kind: Enhancement need/community-input Hint: Needs Community Input

Comments

@rjan90
Copy link
Contributor

rjan90 commented Feb 8, 2023

Checklist

  • This is not a new feature or an enhancement to the Filecoin protocol. If it is, please open an FIP issue.
  • This is not a new feature request. If it is, please file a feature request instead.
  • This is not brainstorming ideas. If you have an idea you'd like to discuss, please open a new discussion on the lotus forum and select the category as Ideas.
  • I have a specific, actionable, and well motivated improvement to propose.

Lotus component

  • lotus daemon - chain sync
  • lotus miner - mining and block production
  • lotus miner/worker - sealing
  • lotus miner - proving(WindowPoSt)
  • lotus miner/market - storage deal
  • lotus miner/market - retrieval deal
  • lotus miner/market - data transfer
  • lotus client
  • lotus JSON-RPC API
  • lotus message management (mpool)
  • Other

Improvement Suggestion

The lotus-worker currently has a couple of commands that tries to do somewhat the same thing:

lotus-worker set - gives the ability to enable/disable new task processing on a worker

lotus-worker wait-quiet - Using this command when you have a sealing task running, blocks the command from finishing until the sealing task is done.

  • Personally I find this command a bit confusing, and I´m unsure what the usability of this command is - If you have a lotus-worker with PC1/PC2 tasks enabled and a PC1-task currently running, the command will block (not finish) until the PC1 task is finished, but the PC2 jobs will start right after. So there seems to be a potential for misconception of the commands usage/what it does.

lotus-worker tasks enable/disable - Allows you to enable or disable a single sealing tasks/ (and soon all sealing tasks), apart from those that are non-configurable (FUS FIN GET FRU C1 PR1).

  • This command is quite similar to the lotus-worker set command, apart from that it will not block the non-configurable tasks. So in contrast to the lotus-worker set cmd, it will allow other workers will be able to fetch/get sealing tasks/sector from the lotus-worker storage when all sealing tasks are disabled.

Usage of these cmds from an storage providers standpoint:

Based on previous issue reports and Slack threads I think most SPs are looking for a command that gives them the ability to “gracefully shutdown” a worker for maintenance:

  1. A lot of incoming sealing tasks in the, but want/need to shut down worker nr.124 for maintainence/upgrade
  2. Issue a command to block incoming tasks, and let it finish its current task.
  3. lotus-worker stop to detach it and do maintenance/upgrades.

Looking for peoples point of view on these commands, and which of these command(s) is actually useful/unuseful. Depreciating some of these seems desirable to prevent user confusion - given that the command(s) remaining has the desired feature(s).

@rjan90 rjan90 added need/triage kind/enhancement Kind: Enhancement need/community-input Hint: Needs Community Input and removed need/triage labels Feb 8, 2023
@SBudo
Copy link

SBudo commented Feb 9, 2023

You're spot on, this is exactly why I use the lotus-worker tasks disable command: maintenance (i.e. gracefully remove a worker from the sealing pipeline so I can shut it down).
I never use the other commands (useless in their current state)

@f8-ptrk
Copy link
Contributor

f8-ptrk commented Feb 10, 2023

lotus-worker wait-quiet - Using this command when you have a sealing task running, blocks the command from finishing until the sealing task is done.

Personally I find this command a bit confusing, and I´m unsure what the usability of this command is - If you have a lotus-worker with PC1/PC2 tasks enabled and a PC1-task currently running, the command will block (not finish) until the PC1 task is finished, but the PC2 jobs will start right after. So there seems to be a potential for misconception of the commands usage/what it does.

spot on. the original idea i had about it was that i run this and then the worker runs out of tasks and i can restart/stop it safely. reading the help thou made me think that it is just not accepting new tasks until the running ones finish.

a command to "on the fly" add or remove sealing tasks from a worker is needed. it allows to fine tune sealing pipelines that naturally might not be balance'able. we sometimes get pc2 piled up, then 5h later c2s - instead of using workers that do both tasks it would be great (possibly this works already, never tried thou - traditionalist i would say...) to have one flipping between them on command!

i am not sure if that even would allow to enable the "run out of jobs" option. disable all tasks should lead to an idle worker that can be stopped, right?

@SBudo
Copy link

SBudo commented Feb 10, 2023

It would also be great to have a command that "forces" the clean out of the a worker for emergency shutdowns.
When running that command, it would abort all the jobs that can be aborted and would safely restart on another worker (for example, abort PC1, PC2, etc. tasks, but not touch any FIN, AP tasks). It would also be good to then move the potential unsealed or cache sectors to another worker...

@rjan90
Copy link
Contributor Author

rjan90 commented Feb 23, 2023

Posting this thread from Slack, which also showcases a users confusion with some of these commands.

I think based on this thread it is rather safe to at least start the work on an eventual deprecation of:

  • lotus-worker wait-quiet

Historical Slack threads about the wait-quiet command, and user confusion about what it does/"not working":


I will leave the other two commands up for debate a bit longer, but for now it seems like lotus-worker tasks enable/disable is the command that has the most wanted behaviour.

@rjan90 rjan90 added this to the v1.21.0 milestone Feb 28, 2023
@rjan90 rjan90 moved this to 🏗 In Progress in Lotus-Miner-V2 Mar 2, 2023
@rjan90 rjan90 moved this from 🏗 In Progress to 🧪In Testing in Lotus-Miner-V2 Mar 3, 2023
@rjan90 rjan90 moved this from 🧪In Testing to 👀 In Review in Lotus-Miner-V2 Mar 3, 2023
@rjan90 rjan90 moved this from 👀 In Review to ✅ Done - v1.21.0 in Lotus-Miner-V2 Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Kind: Enhancement need/community-input Hint: Needs Community Input
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants