Code Monkey home page Code Monkey logo

Comments (4)

utsengar avatar utsengar commented on July 28, 2024

Its blowing up here:

if len(known_ids) > 1:
    # need a way to handle this intelligently through config
    raise ValueError('could not infer dagobah ID, ' + 'multiple available in backend')

And when I comment out this check, it gets the first ID from the list of IDs. And I dont see the jobs which I expect to see.
db.dagobah.find().count() gives 9861

Also, FYI I manually imported about 16jobs by exporting it from sqlite based backend to mongodb backend. Can that be a problem?

Looks like dagobah collection was supposed to be a collection of all the jobs, tasks and hosts. And due to some bug dagobah collection has a bunch of empty dagobah_ids (the job array is empty).

Is there a way to recover all the jobs added in dagobah_job collection?

from dagobah.

thieman avatar thieman commented on July 28, 2024

Is Apache running multiple instances of Dagobah? I'm wondering if some sort of race condition may have got you to this point. With only one instance running at a time, I'm not sure how it would have blown up the DB like that.

Also, is this with stock 0.2 or your custom version? Can you reproduce with 0.2?

Could you also provide some of the docs it's saving to the dagobah collection? Maybe the format of the data in there will provide some clarity.

from dagobah.

utsengar avatar utsengar commented on July 28, 2024

I dont think apache will run multiple instances of dagobah.
Yes, it is my custom version, I am running it again and I am not able to reproduce it now (yet). It's running from the last 19hours and there is just one entry in dagobah.

The current doc has a lot of entries for jobs, hosts etc and I think this won't help. The jobs which were created yesterday was exactly the same except it had no jobs or hosts.

My understanding was even if dagobah collection is empty, dagobah will recreate it from the dagobah_job and dagobah_host collection. But it looks like dagobah is the primary source of truth.

{
    "_id" : ObjectId("527c44ab34d1014b4cf6c36d"),
    "jobs" : [ 
        {
            "status" : "waiting",
            "parent_id" : ObjectId("527c44ab34d1014b4cf6c36d"),
            "tasks" : [ 
                {
                    "completed_at" : null,
                    "host_id" : ObjectId("52741d7c34d10126b7697a93"),
                    "command" : "nodetool compact",
                    "name" : "x compact",
                    "success" : null,
                    "hard_timeout" : 0,
                    "soft_timeout" : 0,
                    "started_at" : null
                }, 
                {
                    "completed_at" : null,
                    "host_id" : ObjectId("52741d6c34d10126b7697a91"),
                    "command" : "nodetool compact",
                    "name" : "x compact",
                    "success" : null,
                    "hard_timeout" : 0,
                    "soft_timeout" : 0,
                    "started_at" : null
                }
            ],
            "job_id" : ObjectId("527c46f734d1014b4cf6c371"),
            "dependencies" : {
                "x compact" : [],
                "y compact" : []
            },
            "cron_schedule" : "30 7 * * 6",
            "next_run" : ISODate("2013-11-09T07:30:00.000Z"),
            "notes" : null,
            "name" : "cass_compact_fri"
        }, 
        {
            "status" : "waiting",
            "parent_id" : ObjectId("527c44ab34d1014b4cf6c36d"),
            "tasks" : [ 
                {
                    "completed_at" : null,
                    "host_id" : "527c4a6e34d1014b4cf6c381",
                    "command" : "ls -lah",
                    "name" : "ls-task",
                    "success" : null,
                    "hard_timeout" : 0,
                    "soft_timeout" : 0,
                    "started_at" : null
                }, 
                {
                    "completed_at" : null,
                    "host_id" : "527c4ae634d1014b4cf6c390",
                    "command" : "pwd",
                    "name" : "pwd-task",
                    "success" : null,
                    "hard_timeout" : 0,
                    "soft_timeout" : 0,
                    "started_at" : null
                }
            ],
            "job_id" : ObjectId("527c4a3d34d1014b4cf6c37f"),
            "dependencies" : {
                "ls-task" : [ 
                    "pwd-task"
                ],
                "pwd-task" : []
            },
            "cron_schedule" : "0 */3 * * *",
            "next_run" : ISODate("2013-11-08T03:00:00.000Z"),
            "notes" : null,
            "name" : "test_job"
        }
    ],
    "dagobah_id" : ObjectId("527c44ab34d1014b4cf6c36d"),
    "created_jobs" : 0,
    "save_date" : ISODate("2013-11-08T02:36:25.512Z"),
    "hosts" : [ 
        {
            "host_id" : ObjectId("527c4a6634d1014b4cf6c380"),
            "host_name" : "wqeqwewqewqewq",
            "parent_id" : ObjectId("527c44ab34d1014b4cf6c36d")
        }, 
    ]
}

This is the json. I have removed all the actual jobs and host names.

from dagobah.

utsengar avatar utsengar commented on July 28, 2024

Never mind. I don't see that problem any more. Will keep an eye on this.

from dagobah.

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.