Package ganeti :: Package client :: Module gnt_debug
[hide private]
[frames] | no frames]

Module gnt_debug

source code

Debugging commands

Classes [hide private]
  _JobQueueTestReporter
Functions [hide private]
int
Delay(opts, args)
Sleeps for a while
source code
int
GenericOpCodes(opts, args)
Send any opcode to the master.
source code
int
TestAllocator(opts, args)
Runs the test allocator opcode.
source code
 
_TestJobDependency(opts)
Tests job dependencies.
source code
 
_TestJobSubmission(opts)
Tests submitting jobs.
source code
 
TestJobqueue(opts, _)
Runs a few tests on the job queue.
source code
int
ListLocks(opts, args)
List all locks.
source code
 
Main() source code
Variables [hide private]
  _LIST_LOCKS_DEF_FIELDS = ["name", "mode", "owner", "pending",]
Default fields for ListLocks
  commands = {"delay":(Delay, [ArgUnknown(min= 1, max= 1)], [cli...
  aliases = {"allocator": "iallocator",}
dictionary with aliases for commands

Imports: simplejson, time, socket, logging, ARGS_ONE_INSTANCE, POWER_DELAY_OPT, NEW_RAPI_CERT_OPT, OOB_TIMEOUT_OPT, TO_GROUP_OPT, MAC_PREFIX_OPT, IPOLICY_STD_SPECS_OPT, CONFIRM_OPT, NOSHUTDOWN_OPT, SHUTDOWN_TIMEOUT_OPT, ParseFields, PRIMARY_IP_VERSION_OPT, ARGS_NONE, ARGS_ONE_GROUP, ARGS_MANY_NODES, UsesRPC, ALLOC_POLICY_OPT, GenericListFields, NOVOTING_OPT, INSTANCE_POLICY_OPTS, ArgUnknown, ERROR_CODES_OPT, SPECS_CPU_COUNT_OPT, SPECS_DISK_SIZE_OPT, SECONDARY_IP_OPT, ARGS_ONE_NETWORK, GATEWAY_OPT, REMOVE_INSTANCE_OPT, PrintGenericInfo, IPOLICY_DISK_TEMPLATES, FormatTimestamp, GenerateTable, ABSOLUTE_OPT, IGNORE_SIZE_OPT, COMMON_CREATE_OPTS, READD_OPT, NO_REMEMBER_OPT, ConfirmOperation, SubmitOrSend, RAPI_CERT_OPT, GATEWAY6_OPT, HV_STATE_OPT, ARGS_MANY_NETWORKS, FILESTORE_DIR_OPT, RUNTIME_MEM_OPT, ROMAN_OPT, SEP_OPT, RESERVED_LVS_OPT, USE_EXTERNAL_MIP_SCRIPT, GLOBAL_SHARED_FILEDIR_OPT, FormatPolicyInfo, NOMODIFY_SSH_SETUP_OPT, GenericInstanceCreate, ArgChoice, NODE_FORCE_JOIN_OPT, DRY_RUN_OPT, CAPAB_VM_OPT, NODE_POWERED_OPT, NODE_PLACEMENT_OPT, JobExecutor, FixHvParams, ToStderr, SELECT_OS_OPT, SINGLE_NODE_OPT, ArgExtStorage, ArgOs, SPICE_CACERT_OPT, PrintIPolicyCommand, IGNORE_ERRORS_OPT, AUTO_REPLACE_OPT, HVLIST_OPT, cli_option, AskUser, ENABLED_DISK_TEMPLATES_OPT, DISK_STATE_OPT, USEUNITS_OPT, EARLY_RELEASE_OPT, VERBOSE_OPT, ArgHost, UIDPOOL_OPT, ALL_OPT, CalculateOSNames, OS_OPT, ARGS_ONE_NODE, ArgCommand, FAILURE_ONLY_OPT, ALLOW_FAILOVER_OPT, NOSTART_OPT, SPECS_NIC_COUNT_OPT, OS_SIZE_OPT, DEBUG_OPT, ON_PRIMARY_OPT, JobSubmittedException, SUBMIT_OPT, MASTER_NETMASK_OPT, SPICE_CERT_OPT, NEW_CLUSTER_CERT_OPT, INTERVAL_OPT, ToStdout, FORCE_FILTER_OPT, OSPARAMS_OPT, AddTags, NONICS_OPT, NODE_PARAMS_OPT, ArgNetwork, RunWhileClusterStopped, BLK_OS_OPT, GLOBAL_FILEDIR_OPT, SRC_NODE_OPT, CAPAB_MASTER_OPT, MODIFY_ETCHOSTS_OPT, SPECS_MEM_SIZE_OPT, TAG_SRC_OPT, NOSSH_KEYCHECK_OPT, NET_OPT, IGNORE_FAILURES_OPT, ADD_UIDS_OPT, MASTER_NETDEV_OPT, USE_REPL_NET_OPT, NODEGROUP_OPT, SRC_DIR_OPT, NODRBD_STORAGE_OPT, SYNC_OPT, IDENTIFY_DEFAULTS_OPT, REMOVE_UIDS_OPT, HYPERVISOR_OPT, IGNORE_IPOLICY_OPT, MC_OPT, ONLINE_INST_OPT, IGNORE_SECONDARIES_OPT, SplitNodeOption, NOLVM_STORAGE_OPT, REBOOT_TYPE_OPT, NONPLUS1_OPT, IGNORE_CONSIST_OPT, NOHDR_OPT, NEW_SPICE_CERT_OPT, TAG_ADD_OPT, SPECS_DISK_COUNT_OPT, NONLIVE_OPT, ARGS_ONE_OS, DISK_OPT, PRIMARY_ONLY_OPT, RemoveTags, AUTO_PROMOTE_OPT, ListTags, DEFAULT_IALLOCATOR_OPT, NEW_PRIMARY_OPT, FORCE_VARIANT_OPT, GetOnlineNodes, NETWORK_OPT, TIMEOUT_OPT, NODE_LIST_OPT, GenericList, ON_SECONDARY_OPT, FormatLogMessage, ArgInstance, CLEANUP_OPT, CreateIPolicyFromOpts, MIGRATION_MODE_OPT, NIC_PARAMS_OPT, NOIPCHECK_OPT, ArgJobId, DRBD_HELPER_OPT, DEBUG_SIMERR_OPT, STATIC_OPT, DISK_TEMPLATE_OPT, ARGS_MANY_GROUPS, REASON_OPT, NO_INSTALL_OPT, YES_DOIT_OPT, FORCE_OPT, SHOWCMD_OPT, SPLIT_ISPECS_OPTS, ArgGroup, OFFLINE_INST_OPT, NWSYNC_OPT, NOCONFLICTSCHECK_OPT, PRIORITY_OPT, SECONDARY_ONLY_OPT, NEW_CLUSTER_DOMAIN_SECRET_OPT, FormatParamsDictInfo, SubmitOpCode, DRAINED_OPT, ParseTimespec, REMOVE_RESERVED_IPS_OPT, GenericMain, ArgFile, WFSYNC_OPT, NORUNTIME_CHGS_OPT, ArgNode, IGNORE_REMOVE_FAILURES_OPT, CP_SIZE_OPT, ADD_RESERVED_IPS_OPT, CLUSTER_DOMAIN_SECRET_OPT, HID_OS_OPT, SHOW_MACHINE_OPT, ALLOCATABLE_OPT, ARGS_MANY_INSTANCES, PREALLOC_WIPE_DISKS_OPT, NONAMECHECK_OPT, FormatQueryResult, FormatError, GetClient, MAINTAIN_NODE_HEALTH_OPT, ArgSuggest, HVOPTS_OPT, IPOLICY_VCPU_RATIO, OFFLINE_OPT, NETWORK6_OPT, NOMODIFY_ETCHOSTS_OPT, ENABLED_HV_OPT, NEW_SECONDARY_OPT, IGNORE_OFFLINE_OPT, VG_NAME_OPT, DISK_PARAMS_OPT, FIELDS_OPT, DST_NODE_OPT, IALLOCATOR_OPT, NEW_CONFD_HMAC_KEY_OPT, FILESTORE_DRIVER_OPT, INCLUDEDEFAULTS_OPT, STARTUP_PAUSED_OPT, DISKIDX_OPT, BACKEND_OPT, cli, constants, opcodes, utils, errors, compat, ht


Function Details [hide private]

Delay(opts, args)

source code 

Sleeps for a while

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should contain only one element, the duration the sleep
Returns: int
the desired exit code

GenericOpCodes(opts, args)

source code 

Send any opcode to the master.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should contain only one element, the path of the file with the opcode definition
Returns: int
the desired exit code

TestAllocator(opts, args)

source code 

Runs the test allocator opcode.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should contain only one element, the iallocator name
Returns: int
the desired exit code

ListLocks(opts, args)

source code 

List all locks.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should be an empty list
Returns: int
the desired exit code

Variables Details [hide private]

commands

Value:
{"delay":(Delay, [ArgUnknown(min= 1, max= 1)], [cli_option("--no-maste\
r", dest= "on_master", default= True, action= "store_false", help= "Do\
 not sleep in the master code"), cli_option("-n", dest= "on_nodes", de\
fault= [], action= "append", help= "Select nodes to sleep on"), cli_op\
tion("-r", "--repeat", type= "int", default= "0", dest= "repeat", help\
= "Number of times to repeat the sleep"), DRY_RUN_OPT, PRIORITY_OPT, S\
UBMIT_OPT,], "[opts...] <duration>", "Executes a TestDelay OpCode"), "\
submit-job":(GenericOpCodes, [ArgFile(min= 1)], [VERBOSE_OPT, cli_opti\
...