News for hackers. Stuff that matters.
Re:An update on Sunday’s service disruption by grogers on Tuesday June 04, 2019 @09:16AM (#20094655)
One of my favorite patterns for updating configuration in-band I learned from Juniper routers. When you enact a new configuration you can have it automatically rollack after some period of time unless you confirm the configuration. Often the pattern is to intentionally have it roll back after a short period (e.g. one minute), then again after a longer period, (e.g. 10 minutes) and the on the last time you make it permanent. I feel like all configuration systems should allow for a similar mechansim
Re:An update on Sunday’s service disruption by xtracto on Tuesday June 04, 2019 @09:57AM (#20095034)
This has been in Windows in the screen resolution configuration option for some time.
Re:An update on Sunday’s service disruption by jonplackett on Tuesday June 04, 2019 @10:38AM (#20095426)
Ah, the lost joy of trying out various screen resolutions and refresh rates on your new monitor.
Re:An update on Sunday’s service disruption by novaleaf on Tuesday June 04, 2019 @11:22AM (#20095850)
nvidia drivers (probably ati too) let you create custom resolutions. I got my monitor to do 1080p@120hz that way. (default supported is only 60hz)
Re:An update on Sunday’s service disruption by MagicPropmaker on Tuesday June 04, 2019 @11:29AM (#20095916)
Yeah, but this is largely moot now that monitors have "native resolutions" with fixed numbers of pixels.
Re:An update on Sunday’s service disruption by stingraycharles on Tuesday June 04, 2019 @10:02AM (#20095096)
I think it has been like this since Windows 3.1, so “some time” might be an understatement.
Re:An update on Sunday’s service disruption by fragmede on Tuesday June 04, 2019 @09:58AM (#20095041)
This is called a watchdog timer, and is frequently used in embedded systems where "bare-metal" "OS" upgrades need to occur. You think it's stressful upgrading a router on the other side of the planet, try upgrading the firmware on the Mars Rover!

(I've only heard stories.)

Re:An update on Sunday’s service disruption by gregschlom on Tuesday June 04, 2019 @10:23AM (#20095286)
That's not really what a whatchdog timer is though.

https://en.m.wikipedia.org/wiki/Watchdog_timer

Re:An update on Sunday’s service disruption by penagwin on Tuesday June 04, 2019 @10:26AM (#20095320)
While Watchdog Timer is more so an external-to-the-cpu system for embedded systems, I'm not sure if there's a word for it in the software world other then some form of timeout?
Re:An update on Sunday’s service disruption by tntn on Tuesday June 04, 2019 @11:38AM (#20096009)
A watchdog timer is so named because it watches for some undesirable condition (usually a hang) and takes action if the condition lasts too long. This sort of auto-rollback is not that because it doesn't detect if something is bad, just rolls it back unless you tell it not to.
Re:An update on Sunday’s service disruption by penagwin on Tuesday June 04, 2019 @01:58PM (#20097555)
Actually I think a watchdog timer doesn't watch anything except it's timer.

> A watchdog timer is an electronic timer that is used to detect and recover from computer malfunctions. During normal operation, the computer regularly resets the watchdog timer to prevent it from elapsing, or "timing out".

It doesn't care about the state of anything except it's timer, and the only way to prevent it from activating is to reset the timer or disable the watchdog altogether.

That would still make sense in terms of auto-roll backs. You can't trust the state as a miss-configuration makes it unreliable.

The only difference I see from "auto-rollbacks" and "watchdog timers" is that watchdog timers are usually meant to be permanent, while auto-rollbacks are temporary (once you confirm it the auto-rollback never occurs again).

Re:An update on Sunday’s service disruption by MisterTea on Tuesday June 04, 2019 @03:24PM (#20098328)
> Actually I think a watchdog timer doesn't watch anything except it's timer.

That's exactly how they work. A watchdog is a just a timer with a reset input and expired output, and perhaps a register for the timer period.

A practical example would a be a watchdog that ensures a control loop is in fact running, if not, reset the CPU. Let's say our control loop has a cycle never longer than 10ms. So we set the watchdog timer to 10ms. You wire the watchdog expired output to the reset pin of your CPU and put a line of code at the end of your control loop that sends a reset signal to the watchdog on each loop. If the program halts, the watchdog is allowed to expire firing the reset signal which will hopefully bring the system back without intervention.

Seen an old JK laser with a two stage hardware watchdog. The engineer who worked on it said the first stage was tied to the NMI pin of the 6809 CPU which resets the control software to a safe state. If that failed, the second stage timed out which meant that something was really wrong (cpu/memory fault) and would shut the machine down.

Re:An update on Sunday’s service disruption by tntn on Tuesday June 04, 2019 @02:25PM (#20097811)
Hm, yeah, that seems fair.

I guess I was thinking of the periodic timer reset as part of the watchdog mechanism. Maybe another difference is whether the interaction with the timer is manual.

Re:An update on Sunday’s service disruption by jonahrd on Tuesday June 04, 2019 @02:34PM (#20097894)
A watchdog timer is typically a timer that's linked to some hard reset of the CPU/system. The system must "kick" the watchdog before it times out (every single time) in order to stay running.

This sounds similar to what was being described.

Re:An update on Sunday’s service disruption by mikro2nd on Tuesday June 04, 2019 @09:38AM (#20094865)
I recall one occasion when I thanked all the gods for having been taught this pattern... firewall changes made from 2000km away that went pear-shaped...
Re:An update on Sunday’s service disruption by mikevin on Tuesday June 04, 2019 @09:58AM (#20095050)
Networking hardware often has this option and I miss it often when deploying configuration changes to software. Its something a lot more systems could use.
Re:An update on Sunday’s service disruption by rossjudson on Tuesday June 04, 2019 @10:55AM (#20095602)
"Do you want to keep this resolution?"

Yes|No