GithubHelp home page GithubHelp logo

Comments (11)

awh avatar awh commented on June 16, 2024 2

Some progress on this - #39 moves us towards supporting CentOS/RHEL without external scripts...

from kured.

winjer avatar winjer commented on June 16, 2024 1

PR #77 Seems to work ok and it would be great if someone is able to review it and merge it. Is that possible? @awh?

from kured.

awh avatar awh commented on June 16, 2024

Thanks for the report @rsohn. I like your idea of specifying a command, but sadly kured is running inside a container - it has neither access to arbitrary executables in the host filesystem, nor the sources of information such an executable might be using to determine if a reboot is required. You'll note that for the Debian/Ubuntu case the daemonset bind mounts /var/run into the container so that it can detect the presence of the sentinel file in the host - we would have to do something similar here after working out where needs-restarting is getting its information from. We may also have to include a copy of needs-restarting in the kured container image. In the meantime your workaround is sound, I will update the docs until we can do better.

from kured.

Matty9191 avatar Matty9191 commented on June 16, 2024

@rsohn I cobbled together a restart script for my Fedora and CentOS lab systems. I'm installing and activating it with ansible and its working like a champ. Not sure if this will be of any value to you but thought I would pass it on.

from kured.

davidkarlsen avatar davidkarlsen commented on June 16, 2024

With #39 on board - what more is needed?

from kured.

rsohn avatar rsohn commented on June 16, 2024

It appears to me to be complete.

from kured.

davidkarlsen avatar davidkarlsen commented on June 16, 2024

So . basically this issue should be closed as fixed?

from kured.

etiennetremel avatar etiennetremel commented on June 16, 2024

Maybe I'm missing something but if I look at the changes introduced by #39, it doesn't let you execute a binary.
@awh, should we introduce a new flag for this purpose? I can help if needed

from kured.

lumi017 avatar lumi017 commented on June 16, 2024

Some progress on this - #39 moves us towards supporting CentOS/RHEL without external scripts...

@awh can you please elaborate? We still cannot use needs-restarting -r as sentinel.
The current implementation is using sentinelCmd := newCommand("/usr/bin/nsenter", "-m/proc/1/ns/mnt", "--", "/usr/bin/test", "-f", rebootSentinel)

Some tests to confirm it doesn't work with a command:

[root@host ~]# needs-restarting -r
No core libraries or services have been updated.
Reboot is probably not necessary.
[root@host ~]# echo $?
0
[root@host ~]# test -f 'needs-restarting -r'
[root@host ~]# echo $?
1
[root@host ~]# test -f '! needs-restarting -r'
[root@host ~]# echo $?
1
[root@host ~]# needs-restarting -r
Core libraries or services have been updated:
  systemd -> 219-62.el7_6.6

Reboot is required to ensure that your system benefits from these updates.

More information:
https://access.redhat.com/solutions/27943
[root@host ~]# echo $?
1
[root@host ~]# test -f '! needs-restarting -r'
[root@host ~]# echo $?
1
[root@host ~]# test -f 'needs-restarting -r'
[root@host ~]# echo $?
1

Can we have a successful implementation to depend on a return code of needs-restarting -r or you cannot bypass some limitation(s)?

from kured.

rsohn avatar rsohn commented on June 16, 2024

It seems like "test" might not be the right mechanism to use here. Certainly, the -f option is a problem, as that checks for the existence of a file, rather than a return code.

Perhaps eval 'needs-restarting -r >/dev/null' is closer to what is needed here?

from kured.

github-actions avatar github-actions commented on June 16, 2024

This issue was automatically considered stale due to lack of activity. Please update it and/or join our slack channels to promote it, before it automatically closes (in 7 days).

from kured.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.