Giter VIP home page Giter VIP logo

Comments (6)

fheslouin avatar fheslouin commented on August 24, 2024 1

I tried individually each path from https://github.com/trbs/pid/blob/master/pid/utils.py#L26-L29, everything is working fine and I can not reproduce the issue I had, even whiteout specifying piddir it works.

I'll leave a comment if the issue re-appear.

from pid.

rbscholtus avatar rbscholtus commented on August 24, 2024

from pid.

fheslouin avatar fheslouin commented on August 24, 2024

The method deploy() takes quite a lot of time to be executed. It actually use subprocess.Popen and spawn an ansible command that execute a playbook. I have seen some issue at this stage with the lock. But this is not always happening and sometime it works and some time the script does not care about the lock.

Here is the complete script : https://gitlab.com/bibliosansfrontieres/tm/factory_manager/blob/master/scripts/kea/deploy.py#L248-253

I'm probably missing something...

from pid.

trbs avatar trbs commented on August 24, 2024

It seems like it "should-just-work(tm)"...
Can't quickly see why this would fail in your script...

Some things to try from the top of my head:

  • Try using PidFile(register_atexit=False) just in case... (although since your using stock Python mostly I don't see why this would matter)
  • Try setting the debug log level (for PidFile Logger) and watch for the 'create pidfile' and 'closing pidfile' lines.
  • Is anything else maybe cleaning up the file ? (some tmpreaper type process on the machine ?) (in this case Barend's suggestion for little test script with time.sleep(...) should show the same behavior...)
  • If you suspect (or want to rule out) something else in the system you could try using Pidfile(piddir="/some/test/directory")

from pid.

fheslouin avatar fheslouin commented on August 24, 2024

thanks @trbs for your help ! I managed to have my script behave as expected. I used piddir="/some/test/directory" to specify the directory. I guess the regular /run/user/%s/ did not work so well with my system (Ubuntu 16.04.7 LTS)

from pid.

trbs avatar trbs commented on August 24, 2024

Good to hear that you got it to work :-)

I am still very curious was the root cause of this issue is.

This might be a caveat to warn other people about... or maybe even change the default piddir if need be...

@fheslouin if you might have some time could you make a simple test case that (as reliable as possible) triggers this ?

from pid.

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.