~ubuntu-branches/ubuntu/vivid/ctdb/vivid-proposed

« back to all changes in this revision

Viewing changes to server/ctdb_recoverd.c

  • Committer: Package Import Robot
  • Author(s): Mathieu Parent
  • Date: 2011-11-06 15:18:59 UTC
  • mfrom: (1.2.14)
  • Revision ID: package-import@ubuntu.com-20111106151859-41lblk8ml4es7ra3
Tags: 1.11+git20111102-1
* New upstream release
  - removed 92-apache-service-enable.diff: integrated 
  - removed 99-fix-broken-readdir-test.diff: integrated
* d/rules, d/control, d/compat:
  - converted to dh (% target and dh_auto_*)
  - moved to compat level 9 (buildeps upgraded)
  - dh9 enabled hardening build flags
  - added hardening=+bindnow
  - dh9 enabled multiarch
    + Don't use /use/lib64 on ppc64 (Closes: #644907)
    + libctdb-dev is Multi-Arch: same
    + removed 10_no-lib64.diff: not needed with multiarch
* ctdb.init:
  - removed gettext support
  - synced with upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
439
439
                                return -1;
440
440
                        }
441
441
                        ctdb_ctrl_createdb(ctdb, CONTROL_TIMEOUT(), nodemap->nodes[j].pnn, 
442
 
                                           mem_ctx, name, dbmap->dbs[db].persistent);
 
442
                                           mem_ctx, name,
 
443
                                           dbmap->dbs[db].flags & CTDB_DB_FLAGS_PERSISTENT);
443
444
                        if (ret != 0) {
444
445
                                DEBUG(DEBUG_ERR, (__location__ " Unable to create remote db:%s\n", name));
445
446
                                return -1;
502
503
                                return -1;
503
504
                        }
504
505
                        ctdb_ctrl_createdb(ctdb, CONTROL_TIMEOUT(), pnn, mem_ctx, name, 
505
 
                                           remote_dbmap->dbs[db].persistent);
 
506
                                           remote_dbmap->dbs[db].flags & CTDB_DB_FLAGS_PERSISTENT);
506
507
                        if (ret != 0) {
507
508
                                DEBUG(DEBUG_ERR, (__location__ " Unable to create local db:%s\n", name));
508
509
                                return -1;
823
824
 
824
825
        for (i=0;i<dbmap->num;i++) {
825
826
                if (dbmap->dbs[i].dbid == recs->db_id) {
826
 
                        persistent = dbmap->dbs[i].persistent;
 
827
                        persistent = dbmap->dbs[i].flags & CTDB_DB_FLAGS_PERSISTENT;
827
828
                        break;
828
829
                }
829
830
        }
841
842
        }
842
843
 
843
844
        /* attach to it */
844
 
        ctdb_db = ctdb_attach(ctdb, name, persistent, 0);
 
845
        ctdb_db = ctdb_attach(ctdb, CONTROL_TIMEOUT(), name, persistent, 0);
845
846
        if (ctdb_db == NULL) {
846
847
                DEBUG(DEBUG_ERR,(__location__ " Failed to attach to database '%s'\n", name));
847
848
                talloc_free(tmp_ctx);
1515
1516
        for (i=0;i<dbmap->num;i++) {
1516
1517
                ret = recover_database(rec, mem_ctx,
1517
1518
                                       dbmap->dbs[i].dbid,
1518
 
                                       dbmap->dbs[i].persistent,
 
1519
                                       dbmap->dbs[i].flags & CTDB_DB_FLAGS_PERSISTENT,
1519
1520
                                       pnn, nodemap, generation);
1520
1521
                if (ret != 0) {
1521
1522
                        DEBUG(DEBUG_ERR, (__location__ " Failed to recover database 0x%x\n", dbmap->dbs[i].dbid));
1638
1639
                DEBUG(DEBUG_ERR, (__location__ " Unable to setup public takeover addresses. ctdb_takeover_run() failed.\n"));
1639
1640
                rec->need_takeover_run = true;
1640
1641
        }
1641
 
        DEBUG(DEBUG_NOTICE, (__location__ " Recovery - takeip finished\n"));
1642
1642
 
1643
1643
        /* execute the "recovered" event script on all nodes */
1644
1644
        ret = run_recovered_eventscript(ctdb, nodemap, "do_recovery");