Tired of accidentally rebooting my server, must be 10x now.

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377

This UI design flaw is killing me.
Sure, I shouldn't have the old tab open but also if auto complete decides to be an idiot that day, same problem.

Someone tell me, I'm not the only one who's done this, multiple times?
Anyone else?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Not I. But then, I can't remember the last time I rebooted the system deliberately through the UI without simultaneously installing an update.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Not I. But then, I can't remember the last time I rebooted the system deliberately through the UI without simultaneously installing an update.
Can you please try the URL and see if I'm correct?

http://192.168.0.9/ui/others/reboot (change the IP)
Tell me if that URL will push you to a login window (makes sense!) then once logged in, it instantly reboots the server?

It's a UI design issue.
 
Last edited by a moderator:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
What is the purported UI design flaw? You browse to the URL of the "reboot" action, and the server reboots. AFAICT, the response is 100% accurate--if you don't want the system to reboot, don't browse to that URL.
 
Last edited by a moderator:

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
What is the purported UI design flaw? You browse to the URL of the "reboot" action, and the server reboots. AFAICT, the "idiotic response" is 100% accurate--if you don't want the system to reboot, don't browse to that URL.
The system should be prompting me to confirm in some capacity.
The fact an old idle chrome tab, that I haven't seen in days, can be simply clicked on and it can reboot my server, is frankly, insane.
The "cookie" or whatever it is, session id? I don't know, should no longer be valid for rebooting the system.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The "cookie" or whatever it is, session id? I don't know, should no longer be valid for rebooting the system.
I don't know that I'd disagree here, but there are plenty of others complaining about the UI's timeout. I can't see your ticket, so I thus have no idea what you reported beyond what's stated in this thread, but I have a hard time agreeing that "browsing to the UI's reboot endpoint reboots the server" is anything like "insane." It instead sounds like the system is working exactly as designed--surely with room for improvement, but nonetheless as (reasonably) designed.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I don't know that I'd disagree here, but there are plenty of others complaining about the UI's timeout. I can't see your ticket, so I thus have no idea what you reported beyond what's stated in this thread, but I have a hard time agreeing that "browsing to the UI's reboot endpoint reboots the server" is anything like "insane." It instead sounds like the system is working exactly as designed--surely with room for improvement, but nonetheless as (reasonably) designed.

At the end of the day, if I have 30 tabs open and lose a TrueNAS one, if I switch back to 'the wrong one' the server reboots.
I don't know the precise cause and unfortunately I am not 1000% positive what is going on.


I'm switching back to a tab, the tab is possibly in a chrome 'sleeping' state (it seems so) and it then wakes and refreshes the tab
Now I don't know if I'm being prompted to log in and so I do so and then bam it reboots, but I *think* I'm not even logging in. I am literally just using CTRL-Tab, switching to or past, an idle TrueNAS tab and in doing so, the server reboots.

I generally don't even know it's been done until I realise the server isn't up.
What I can tell you, with certainty is that I'm not clicking "are you sure" or "ok" or anything like that and yet it reboots.

Like I said, I shouldn't have a lot of tabs open, but this is adhd behaviour and sooner or later a 'normal' person is going to suffer the same fate, on a production server.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
But why have a reboot tab open at all? Most of us surely have what feels like a million tabs open more often than not, so that's not unusual. The unusual part is having the reboot page open in a tab. The obvious next step would be to close the tab after that happens and the problem is identified, so I can think of the following scenarios:
  • Chrome is doing something weird and going back to /reboot on a tab that has since navigated away
  • Chrome is doing an unfortunate autocomplete that includes the /reboot path instead of the GUI root
  • You just lose the tab among the ocean of tabs
I have no great suggestions, but perhaps tactically deleting some browser history elements would improve your experience.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Note, user @tripodal post in this thread:


Should we close the tab? Yes.
Do accidents happen? Yes.
Should the 'cookie' or auth token for reboot confirmation ,expire? Absoloutely.
 

tripodal

Dabbler
Joined
Oct 8, 2020
Messages
19
The issue here is that the UI is inducing unexpected reboots.

User reboots device.
Device goes unresponsive from the perspective of the browser.
Browser attempts to refresh page until device is responsive.

Now one of two things happens.

A:
User returns to shutdown tab, at the login screen; logs in.
System shuts down.

B:
User opens a new tab
Logs in, does stuff;
Browser refreshes background tab.
System reboots.


The average user certainly doesn't expect the system to shutdown or reboot without the button being clicked in any circumstance.

So you can make the button single use; like many web applications do.
You could reject reboot requests that are referred from the login page.
You can popup a warning after the button is selected.


You cannot reboot the system because a browser is simply background refreshing a url. There's a non-zero chance of this type of design causing legal trouble for those with enterprise agreements.
 

tripodal

Dabbler
Joined
Oct 8, 2020
Messages
19
I don't know that I'd disagree here, but there are plenty of others complaining about the UI's timeout. I can't see your ticket, so I thus have no idea what you reported beyond what's stated in this thread, but I have a hard time agreeing that "browsing to the UI's reboot endpoint reboots the server" is anything like "insane." It instead sounds like the system is working exactly as designed--surely with room for improvement, but nonetheless as (reasonably) designed.

This isn't a protected API endpoint called in code as part of a script. It's a URL used by average users in average places by random browsers on random computers. It's arbitrarily easy to protect against session hijacking, accidental double click and cookie reuse. Those are standard and mandatory technologies on other enterprise applications; and shouldn't be omitted here.

Truenas is free so my standing here isn't strong; but Truenas is also not free.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
User returns to shutdown tab, at the login screen; logs in.
System shuts down.
This didn't sound right, so I just tested it on CORE 13.0, and no, this doesn't happen. User reboots system, browser refreshes until login page is available, user logs in, and he's at the dashboard. The system doesn't shut itself down again.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
This didn't sound right, so I just tested it on CORE 13.0, and no, this doesn't happen. User reboots system, browser refreshes until login page is available, user logs in, and he's at the dashboard. The system doesn't shut itself down again.

I've also tested this and for me, same thing it didn't reboot if the tab was left alive and active.
If the tab goes into some kind of suspend or sleep state (user goes off 15 tabs away and forgets about the reboot and forgets about the page) - then the next time the tab is 'woken' - it'll reboot the server.

Me, with many, MANY tabs open can mean I can stumble upon that 'bad tab' days or weeks later.

Somehow, the authorisation token to induce the reboot is not a one time thing, the server will accept the old one and reboot the server.
It might be difficult to reproduce but as per this thread, I've done it at least 6 to 10 times this year and it's now hit @tripodal
 
Top