Author Topic: Re: 10.04 media directors not shutting down [Solved]  (Read 11543 times)

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: 10.04 media directors not shutting down
« Reply #15 on: June 12, 2012, 07:54:33 am »
Thanks, pigdog... I don't think it is a snap / version issue because one of my MDs works. I think it is something to do with the particular image on each so I'll probably do a rebuild image and then, if that fails delete and recreate the MD from scratch. Will reportback.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: 10.04 media directors not shutting down
« Reply #16 on: June 12, 2012, 05:02:22 pm »
It might not be the image. It might just be the way the hardware reacts to the scripts. ACPI is one of those voodoo areas in Linux.
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: 10.04 media directors not shutting down
« Reply #17 on: June 12, 2012, 09:54:35 pm »
It might not be the image. It might just be the way the hardware reacts to the scripts. ACPI is one of those voodoo areas in Linux.
Even given the fact that when I boot the same hardware with a 10.04 live cd, the command shuts the machine down properly?

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: 10.04 media directors not shutting down
« Reply #18 on: June 12, 2012, 10:09:19 pm »
That depends on whether they really are the same. Meaning,... One of the shutdown command line switches is deprecated,... either -h or -P, I don't know which one,... but they're supposed to do the same thing now... but they don't (not always, anyway).
If you're shutting down your system with shutdown -h now, but LinuxMCE does it with shutdown -P now, they may yield different behavior. Unless you are specifically looking at the scripts, you might assume one is used, when it is really the other,... That's what I mean...
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: 10.04 media directors not shutting down
« Reply #19 on: June 13, 2012, 06:45:17 am »
That depends on whether they really are the same. Meaning,... One of the shutdown command line switches is deprecated,... either -h or -P, I don't know which one,... but they're supposed to do the same thing now... but they don't (not always, anyway).
If you're shutting down your system with shutdown -h now, but LinuxMCE does it with shutdown -P now, they may yield different behavior. Unless you are specifically looking at the scripts, you might assume one is used, when it is really the other,... That's what I mean...
I hear you, but if you look further back in the thread you will see I've tried every combination of command line switches in the known universe.... and I've done that on the direct binary executables (bypassing the commands that are just shellscripts) directly from command line as root. Now if I can't shut it down from there I presume LMCE can't, but I know that under standard (live) 10.04 I can...
also, there's been a lot of hacking going on on both these machines so I'll go for a clean build of the images to eliminate any issues there and then try again. Thanks for the pointers, though... will try all combinations again when I get the clean machines up.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: 10.04 media directors not shutting down
« Reply #20 on: June 13, 2012, 07:16:40 am »
That depends on whether they really are the same. Meaning,... One of the shutdown command line switches is deprecated,... either -h or -P, I don't know which one,... but they're supposed to do the same thing now... but they don't (not always, anyway).
If you're shutting down your system with shutdown -h now, but LinuxMCE does it with shutdown -P now, they may yield different behavior. Unless you are specifically looking at the scripts, you might assume one is used, when it is really the other,... That's what I mean...

I will give you a thousand dollars if you can tell me how MDs are shut down from the core.
I never quit... I just ping out.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: 10.04 media directors not shutting down
« Reply #21 on: June 13, 2012, 03:20:17 pm »
Pretty darn well, from my experience...  ;D

Seriously, though, regardless of how it's done, the (internal) effect on the machine is similar, in terms of Posix standards. I'm guessing from your post that the DCE router is causing the the MD to catch a sigterm signal on all running processes, otherwise you wouldn't throw that "dare" out there like that... I'm guessing there's a script to kill off services cleanly, rather than leave the system in a messy state. So, I'm guessing that the system doesn't just throw a shutdown -h now at the MD.

If during what should be a normal power-off shutdown, the machine hangs or reboots, then the same or similar problem to what causes some systems to hang at a P versus an h shutdown is at play,... And that's usually something to do with ACPI. There's a known issue with this stuff in KDE based systems...

That's what's making me think this the problem he's encountering. One particular machine exhibiting odd behavior... Ocam's razor,... simplest solution is usually the correct one.
« Last Edit: June 13, 2012, 03:25:33 pm by JaseP »
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: 10.04 media directors not shutting down
« Reply #22 on: June 13, 2012, 03:56:26 pm »
If you have no idea how something works, applying Occam's razor, all things being equal, you should stop giving advice as you are as likely to do harm as good.

Developers, is for developers.
Installation issues, is for people with installation issues, or solutions for installation issues, which you do sometimes have... however if you have NO idea what you are talking about, we aren't interested in you talking to yourself about how you think things MIGHT work. Use that time figuring out how things DO work.

I offered you a thousand dollars dude.

Code: [Select]
svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-1004/src/
grep -r 'shutdown' ./*
./BootScripts/HaltMDs.sh:       Msg="Not waiting for MDs to shutdown anymore. Continuing."
Code: [Select]
cat BootScripts/HaltMDs.shfor Host in $R; do
        ShutDownRemote "$Host" &
Code: [Select]
grep -r 'ShutDownRemote' ./*./BootScripts/pluto.func:ShutDownRemote() {
Code: [Select]
cat /BootScripts/pluto.funcShutDownRemote() {
  host=$1
  if ! [ $host ]; then
    return
  fi
  Logging $TYPE $SEVERITY_WARNING $module "Shutting down $host"
#  ssh $host "/sbin/init 0" &>/dev/null ||
  ssh $host "/sbin/poweroff" &>/dev/null ||
    Logging $TYPE $SEVERITY_WARNING $module "Couldn't shut down $host"
}

Code: [Select]
ls -l /sbin/po*lrwxrwxrwx 1 root root 6 Apr 26 11:27 /sbin/poweroff -> reboot

This
That depends on whether they really are the same. Meaning,... One of the shutdown command line switches is deprecated,... either -h or -P, I don't know which one,... but they're supposed to do the same thing now... but they don't (not always, anyway).
If you're shutting down your system with shutdown -h now, but LinuxMCE does it with shutdown -P now, they may yield different behavior. Unless you are specifically looking at the scripts, you might assume one is used, when it is really the other,... That's what I mean...

Is a waste of everyones time, time you could have spent actually figuring out how it works.

My goal is not continued harassment of you... it is to get you to look over the edge of the abyss, and see that it is just a really deep hole... and that you can climb down into it. You are a smart guy. Use it to learn rather than guess. You have almost half as many posts as I do, and I have been here for years. I have read every one of those posts. Those posts all take my and everyones time to read. Rather than burning our time, burn yours... pick up the light saber. Use the force.
I never quit... I just ping out.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: 10.04 media directors not shutting down
« Reply #23 on: June 13, 2012, 04:25:29 pm »
Point taken, but in my defense,... My first inclination would have been to have a look in sbin. But I (mostly) post in between doing things at work,... Tough for me to look at how it works without the machine directly in front of me... Seems like jamo did have his right in front of him...

So back to the issue and me learning how this works (thanks for taking the time to post what is supposed to happen, by the way):
So, it's ultimately calling poweroff from sbin,... and poweroff is rebooting versus shutting down... Is that the expected behavior (auto-rebooting the MD), or is his system responding incorrectly to poweroff ?

If it is behaving badly to poweroff, one solution would be to rename poweroff to poweroff.old, and create an executable script in sbin with the correct shutdown command that's proven to work in that system. It's a hack,... but if poweroff is not working in a minority of machines, it's a good band-aid until someone can get around to deciding whether to change something.
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: 10.04 media directors not shutting down
« Reply #24 on: June 13, 2012, 04:31:59 pm »
This is the same in kubuntu this poweroff symlinked to reboot... and it does shutdown, as opposed to reboot. I am not sure why this is setup this way... it is clearly very counterintuitive.

And you can download our source anywhere.

On my MDs it does shut them down. The idea behind your posts is very likely the issue... save the fact that a Kubuntu live CD execution of the same code does not produce the same result on the same hardware. I was just pointing out that at around post 4 he was already at square one, figuring out what the binaries do. More digging will have to be done as to WHY our implementation is behaving differently with regards to ACPI.
* l3mce hands JaseP a shovel
Welcome to the dark side.
I never quit... I just ping out.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: 10.04 media directors not shutting down
« Reply #25 on: June 13, 2012, 05:04:49 pm »
ACPI is the dark side...

I long ago stopped asking why something behaved weird where ACPI is concerned. Many times it's quirky hardware. The answer could be PXE boot implementation on the machine, or it could be gremlins. He could have another identical machine with a different BIOS revision that behaves differently (I do,... not with this issue, but other things), or a similarly badged machine that has different internals (such as; newer version of a motherboard). OEMs do all kinds of crap where hardware is concerned (change chipsets without notice, make BIOS changes that break crap, change entire motherboards, etc.). You can look at two different versions of the same motherboard, and have one with components that the other doesn't have, like capacitors, jumpers, etc.

I had considered a side business of importing x86 tablets and installing Linux on them,... but I couldn't get any consistency from the Chinese on chipsets, pricing, or even the look of the machines... In the end, I just gave up, because after I nailed them down on chipsets that I knew worked, they charged more per unit than I could get a Dell Inspiron Duo for.
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: 10.04 media directors not shutting down [Solved]
« Reply #26 on: June 16, 2012, 09:56:28 pm »
At last.
Started with the globalupdate script which updated all my MDs nicely but didn't solve my shutdown problem.

So, I took out the bazooka-

Ran Diskless_CreateTBZ.sh to get the latest stuff for creating new MDs and deleted my existing MDs (the problematic ones) from webadmin and then recreated them- ie booted them up and let the scripts etc do their thang. And I have to say it all went *very* smoothly. My two old radeon cards that previously required many handsprings were now correctly identified and configured "out the box" and the MDs are running super smoothly. UI2 on one AND UI1 on the other, both running very smoothly and shutting down properly! Yay.

My conclusion is that somewhere in the messing about installing/re-installing/removing packages to try to get the video cards to work I must have messed something up in the base ubuntu packages which was causing the problem. It was impossible to shut them down properly from command line using any combination of /sbin/shutdown, /sbin/reboot or /sbin/poweroff commands and various parameters - they would reboot instead of shutting down and would do so immediately rather than going through a process....  however they could do it no problem when booted from a live 10.04 cd so I presumed it was something to do with the install/configuration. Anyway the clean install sorted them out.

In case someone hits a similar wall- take out the bazooka!