Opened 7 years ago

Closed 4 years ago

#766 closed enhancement (fixed)

Auto-start by default in i2psnark

Reported by: dg Owned by: dg
Priority: minor Milestone: 0.9.22
Component: apps/i2psnark Version: 0.9.3
Keywords: usability easy Cc:
Parent Tickets: Sensitive: no

Description

Relevant IRC logs:

<dg> Can I ask how hard it'd be to get auto-start to be turned on by default in i2psnark?
<dg> It seems redundant to have it off by default
<dg> I've seen people complaining about it, and considering sharing is caring, having more peers and data floating around wouldn't be bad
<dg> or alternatively, a way to save which torrents are turned off and which are turned on and to restore from that save on restart
<dg> (If you have a few torrents stopped and a few started and then you reboot, you get them all started on reboot w/ autostart)
<dg> It seems like only a select few would want autostart off
<dg> It may also benefit the torrent community a bit, considering some can be forgetful etc

<Laughing_Buddha> Why not have some kind of wizard on the first start?
<Laughing_Buddha> It could ask the user what kind of behaviour he wants
<dg> If we had the session saving of which torrents were on (or not), we could reboot and then know which ones the user wanted running or not rather than randomly starting up possibly hundred or thousands of torrents which user did not want seeded/downloaded
<dg> and if we had the ones the user wanted running, it's not harming anybody
<Laughing_Buddha> Also a good idea

<dg> Well, it wouldn't be hard to make it the default but the status thing may need doing and I'm not sure how

To sum up, however:
i2psnark's auto-start should be enabled by default. We could just toggle it to be on by default or we could have code which saves list of running torrents, and on start, i2psnark will read these and start THOSE torrents, instead of accidentally firing up all 1000 of torrents or the like which user did not want running. It could benefit the torrenting community and doesn't seem to make us lose much, maybe lot to gain.

Subtickets

#1132: New per-torrent config system for i2psnarkclosedzzz

Change History (17)

comment:1 Changed 7 years ago by dg

Cc: dg2@… added

comment:2 Changed 7 years ago by zzz

I'm not in favor of this.

For example, I have lots of torrents but only run a few. If they all started on router restart that would be bad. Also, when we have router update-via-torrent (coming soon), this would generate complaints if people continue seeding the update after restart. Many people have never used snark, but now they have to go figure out how to delete the update torrent or it will keep running forever.

comment:3 Changed 7 years ago by DISABLED

I see it as user zzz. In addition, each newly created torrent reports at tracker, although it is not yet registered there. But after he was registered with the tracker, the torrent must be turned off in client and then back on, so that the previously dropped connection is re-established.

(Ich sehe das auch so wie User zzz. Zudem meldet sich jeder neu erstellte Torrent beim Tracker, obwohl er dort noch nicht eingetragen ist. Aber nachdem er beim Tracker angemeldet wurde, muss der Torrent im Klienten ausgeschaltet und wieder eingeschaltet werden, damit die zuvor verworfene Verbindung neu hergestellt wird.)

comment:4 Changed 7 years ago by dg

zzz, I propose we have a session manager as I aforementioned then.

<dg> If we had the session saving of which torrents were on (or not), we could reboot and then know which ones the user wanted running or not rather than randomly starting up possibly hundred or thousands of torrents which user did not want seeded/downloaded
<dg> and if we had the ones the user wanted running, it's not harming anybody

Doesn't seem high priority but it would be beneficial if it was done. Could benefit the seeding community a little and give some convenience.

comment:5 Changed 7 years ago by zzz

Milestone: 0.9.40.9.9

Not a bad idea. Unfortunately, we're already pushing the per-torrent config in i2psnark.config to the limit.

Probably best to wait for str4d's Preferences implementation to get merged. Then we can migrate the config to that, and have a more-sophisticated per-torrent config. This would also make it easier to implement e.g. torrent data outside the /i2psnark/ directory.

comment:6 Changed 6 years ago by zzz

Add a subticket #1132.

comment:7 Changed 5 years ago by str4d

Keywords: usability easy added; featurewish removed
Milestone: 0.9.9

Now that we have a per-torrent config system, we can revisit this.

Implementing comment:4 should simply require saving the current started state whenever it changes, and then starting torrents as appropriate when the router starts.

comment:8 Changed 5 years ago by user

+1

comment:9 Changed 4 years ago by dg

Cc: dg2@… removed
Milestone: 0.9.21
Owner: changed from zzz to dg
Status: newassigned

I'm working on this for 0.9.21.

comment:10 Changed 4 years ago by dg

Status: assignedtesting

Done in b5f9464925350e50121d962c7564b064cffdd08d 0.9.20-9.
Leaving open for testing/feedback.

comment:11 Changed 4 years ago by backup

Status: testingneeds_work

Updated router from 0.9.20-12 to 0.9.20-13:

Still all torrents stopped after restart. Torrents were running before restart.

See also http://zzz.i2p/topics/1911-0-9-20-11 posting #2

Thanks,
backup

comment:12 in reply to:  11 Changed 4 years ago by dg

Status: needs_worktesting

Replying to backup:

Updated router from 0.9.20-12 to 0.9.20-13:

Still all torrents stopped after restart. Torrents were running before restart.

See also http://zzz.i2p/topics/1911-0-9-20-11 posting #2

Thanks,
backup

I didn't bump when I included a probable fix. Sorry.
You'll need to start the torrents manually and then restart to determine if it is fixed.

I can't commit anything else for a few days but with how things looked and zzz's advice, the latest changes (which you should have now) will probably work. The issue is that -12 was still broken, and the bump to -13 means that it was fixed.

Your Snark didn't actually save state correctly because it was in an old version when it shutdown. Thanks for testing, and let me know if it's fixed!

comment:13 Changed 4 years ago by backup

Status: testingneeds_work

Sorry, didn't want to rush - I'm not aware when you did the commit :-)

0.9.20-14:
Still all torrents are stopped after restart. Config files xxxxxx.config contains all running=false.
Seems running state is not being saved on router restart.

And another one, don't know the old behavior:

manually moving torrent-file *and* already finished data into the i2psnark folder: With setting "Auto start torrents" I would expect this torrent is started too - but it's only added, not started.

Thanks backup

comment:14 Changed 4 years ago by killyourtv

Also, with -13, adding a new torrent file to the i2psnark directory will not start the torrent.

comment:15 Changed 4 years ago by dg

Status: needs_worktesting

It looks as if -15 solves the issues reported.
Can you both test and tell me if there are any more issues?

Thanks again!

comment:16 Changed 4 years ago by zzz

Status: testingneeds_work

0.9.20-16, autostart set to false in i2psnark.config, snark spewed a ton of errors at startup and then built tunnels. errors at http://pastethis.i2p/show/xixAfi8Om75a3buDsk7A/

comment:17 Changed 4 years ago by dg

Milestone: 0.9.210.9.22
Resolution: fixed
Status: needs_workclosed

This was fixed in 0.9.22 (.21-7, 023ae3dc5bbf691809ba24120470f652cbaba209).

See #1635 for discussion on whether or not to increase save frequency.

Note: See TracTickets for help on using tickets.