So today I discovered that there’s a cron job that holds non-reproducible state that died, and now our system is fucked.

The cron job doesn’t live inside any source control. This morning it entered a terminal state, and because it overwrites its state there’s no way to revert it.

I’m currently waiting for the database rollback and have rewritten it in a reproducible/idempotent way.

  • @[email protected]OP
    link
    fedilink
    1443 months ago

    What’s extra frustrating is the previous guy did create a git repo of these types of hacks, but this one doesn’t live in it for no discernible reason.

      • @[email protected]
        link
        fedilink
        163 months ago

        But the whole point of the doomsday machine is lost… if you keep it a secret! Why didn’t you tell the world, eh?

        • @[email protected]
          link
          fedilink
          English
          83 months ago

          It was going to be announced at his retirement party on Monday… You know the dev likes surprises.

      • @[email protected]OP
        link
        fedilink
        1023 months ago

        He does charge a consulting fee to “fix” these issues

        Almost all of them are dumb shit like this, where something is built in super hacky and dumbass ways.

            • @[email protected]
              link
              fedilink
              43 months ago

              that might be a stupid question, but why would you running all services in tmux be a bad idea? a co-worker of mine is doing exactly that right now, which is why I’m asking.

              • swab148
                link
                fedilink
                English
                33 months ago

                It’s not horrible, like it’ll do the job just fine, it’s just probably a better idea to use systemd and like, containers and whatnot, but I couldn’t be arsed to fiddle with all that for Jellyfin, caddy reverse proxy, and two modded Minecraft servers, so shell scripts and tmux won the day. It takes a little extra time to restart everything after an update, and maybe I’ll get the motivation to do things “correctly™” one day, but today is not that day.

              • qaz
                link
                fedilink
                English
                2
                edit-2
                3 months ago
                1. They’re all gone when you restart
                2. It doesn’t properly deal with logging
                3. You can’t set up dependencies between services but that doesn’t matter due to point 1

                I recommend using systemd services and/or docker compose instead. systemd services are files that describe which program / script to run and when (like after networking is active or after a certain other service is loaded).

          • @[email protected]
            link
            fedilink
            193 months ago

            Judgement day postponed indefinitely due to “Object reference not set to an instance of an object”

            • @[email protected]
              link
              fedilink
              13 months ago

              I don’t know why but this is the first time I read this phrase and it actually makes sense.

              I knew exactly what it meant before, but it didn’t make sense until now

  • @[email protected]
    link
    fedilink
    223 months ago

    Cron job that evals some base64 encoded string which is actually downloading a script from a personal GitHub repo of an IT guy who left…

  • mesa
    link
    fedilink
    English
    153 months ago

    We have a couple of those at work. Black boxes that are used.

    I’m rebuilding one after it failed on one morning for SQL odbc reasons. And its just a binary that shuffles data around.

  • @[email protected]
    link
    fedilink
    English
    33 months ago

    For us it’s a task that no one is even aware of and the first issue is the customer saying their data export doesn’t work. You had a data export?

  • @[email protected]
    link
    fedilink
    113 months ago

    Time to restore a whole machine backup to a VM with no network connectivity, and manually pull the command?

    • @[email protected]OP
      link
      fedilink
      223 months ago

      I was able to do that

      Turns out there was a second bug which triggered this one, and a bug I found in this script that I thought was responsible was happening silently for months.

      Now three bugs are squashed

  • @[email protected]
    link
    fedilink
    English
    653 months ago

    This is almost exactly what happened to me on Monday, resulting in a fifteen hour day.

    My particular jenga piece was an undocumented Access query that none of my predecessors had deigned to document or even tell me about… but was critical to run monthly or you had obsolete data embedded deep within multi-million dollar reports.

    Thank god I don’t work on salary anymore, or I’d be really upset.

  • @[email protected]
    link
    fedilink
    22 months ago

    I have also mixed up crontab -l with crontab -r. 😔

    Let this be a lesson to start versioning your crontabs.

    • tiredofsametab
      link
      fedilink
      12 months ago

      We never had our crons in source control, but I always saved it somewhere (usually on my machine and the target machine) so we had some history just in case of typing r instead of l for some reason. You can also create an alias called backupCrontab or something that runs the command for you and puts the output somewhere safe.

  • @[email protected]
    link
    fedilink
    27
    edit-2
    3 months ago

    Only tangentially related, but “What a elegant house of cards” is an insult i’m going to use someday.