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
int
Wconfd(opts, args)
Send commands to WConfD.
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, OOB_TIMEOUT_OPT, MAC_PREFIX_OPT, IPOLICY_STD_SPECS_OPT, SHUTDOWN_TIMEOUT_OPT, ARGS_ONE_GROUP, ARGS_MANY_NODES, IGNORE_REMOVE_FAILURES_OPT, NWSYNC_OPT, IDENTIFY_DEFAULTS_OPT, FormatParamsDictInfo, FormatTimestamp, DEFAULT_IALLOCATOR_PARAMS_OPT, RAPI_CERT_OPT, AUTO_PROMOTE_OPT, RESERVED_LVS_OPT, FormatPolicyInfo, GLOBAL_SHARED_FILEDIR_OPT, MAINTAIN_NODE_HEALTH_OPT, DRY_RUN_OPT, NIC_PARAMS_OPT, PrintIPolicyCommand, AUTO_REPLACE_OPT, USEUNITS_OPT, NOMODIFY_ETCHOSTS_OPT, VERBOSE_OPT, NEW_NODE_CERT_OPT, HOTPLUG_OPT, GenerateTable, ARGS_ONE_NODE, ALLOW_FAILOVER_OPT, NOSTART_OPT, INSTANCE_COMMUNICATION_NETWORK_OPT, SPECS_NIC_COUNT_OPT, MASTER_NETMASK_OPT, INTERVAL_OPT, ToStdout, OSPARAMS_OPT, RQL_OPT, CAPAB_MASTER_OPT, MODIFY_ETCHOSTS_OPT, SPECS_MEM_SIZE_OPT, TAG_SRC_OPT, ERROR_CODES_OPT, NODEGROUP_OPT, SYNC_OPT, ONLINE_INST_OPT, NONPLUS1_OPT, HV_STATE_OPT, ARGS_ONE_OS, NETWORK_OPT, TIMEOUT_OPT, ON_SECONDARY_OPT, MIGRATION_MODE_OPT, REMOVE_INSTANCE_OPT, SEQUENTIAL_OPT, ZEROING_TIMEOUT_PER_MIB_OPT, DISK_TEMPLATE_OPT, REASON_OPT, NO_INSTALL_OPT, DEFAULT_IALLOCATOR_OPT, NOCONFLICTSCHECK_OPT, SubmitOpCode, ArgNode, CP_SIZE_OPT, ALLOCATABLE_OPT, PREALLOC_WIPE_DISKS_OPT, IPOLICY_VCPU_RATIO, GetClient, ENABLED_HV_OPT, PrintGenericInfo, FIELDS_OPT, GLOBAL_GLUSTER_FILEDIR_OPT, INCLUDEDEFAULTS_OPT, ARGS_ONE_INSTANCE, IPOLICY_SPINDLE_RATIO, IPOLICY_DISK_TEMPLATES, NO_REMEMBER_OPT, NOVOTING_OPT, SPECS_CPU_COUNT_OPT, SECONDARY_IP_OPT, NETWORK6_OPT, ABSOLUTE_OPT, READD_OPT, BACKEND_OPT, FILESTORE_DIR_OPT, OSPARAMS_PRIVATE_OPT, NONAMECHECK_OPT, NODE_POWERED_OPT, TAG_ADD_OPT, ArgOs, HVLIST_OPT, CONFIRM_OPT, ALL_OPT, CalculateOSNames, ENABLED_USER_SHUTDOWN_OPT, FAILURE_ONLY_OPT, ENABLED_DISK_TEMPLATES_OPT, SUBMIT_OPT, GATEWAY_OPT, ADD_UIDS_OPT, NODE_PARAMS_OPT, SPLIT_ISPECS_OPTS, GLOBAL_FILEDIR_OPT, NOSHUTDOWN_OPT, NET_OPT, IGNORE_FAILURES_OPT, SRC_DIR_OPT, REMOVE_UIDS_OPT, HYPERVISOR_OPT, MC_OPT, IGNORE_CONSIST_OPT, NODE_FORCE_JOIN_OPT, RunWhileDaemonsStopped, STATIC_OPT, NONLIVE_OPT, DISK_OPT, REMOVE_RESERVED_IPS_OPT, COMPRESS_OPT, FILESTORE_DRIVER_OPT, CreateIPolicyFromOpts, ArgJobId, ConfirmOperation, HELPER_SHUTDOWN_TIMEOUT_OPT, SHOWCMD_OPT, ArgGroup, OFFLINE_INST_OPT, SECONDARY_ONLY_OPT, NEW_CLUSTER_DOMAIN_SECRET_OPT, ParseTimespec, ZERO_FREE_SPACE_OPT, RUNTIME_MEM_OPT, HID_OS_OPT, NOHDR_OPT, ZEROING_IMAGE_OPT, DRBD_HELPER_OPT, VG_NAME_OPT, SubmitOpCodeToDrainedQueue, IALLOCATOR_OPT, STARTUP_PAUSED_OPT, DISKIDX_OPT, TO_GROUP_OPT, POWER_DELAY_OPT, NOIPCHECK_OPT, IGNORE_SECONDARIES_OPT, GenericList, CLEANUP_OPT, HOTPLUG_IF_POSSIBLE_OPT, COMMON_CREATE_OPTS, GenericInstanceCreate, ArgChoice, CAPAB_VM_OPT, NODE_PLACEMENT_OPT, FixHvParams, ToStderr, ArgExtStorage, FORCE_VARIANT_OPT, AskUser, CLUSTER_DOMAIN_SECRET_OPT, DISK_STATE_OPT, UIDPOOL_OPT, IGNORE_SIZE_OPT, OS_SIZE_OPT, ON_PRIMARY_OPT, ArgNetwork, SRC_NODE_OPT, NOSSH_KEYCHECK_OPT, INSTANCE_POLICY_OPTS, MASTER_NETDEV_OPT, NOMODIFY_SSH_SETUP_OPT, ParseFields, INSTANCE_COMMUNICATION_OPT, DEBUG_OPT, IGNORE_ERRORS_OPT, EARLY_RELEASE_OPT, SplitNodeOption, NEW_SPICE_CERT_OPT, SPECS_DISK_COUNT_OPT, PRIMARY_ONLY_OPT, RemoveTags, NEW_PRIMARY_OPT, ArgInstance, MAX_TRACK_OPT, NONICS_OPT, SELECT_OS_OPT, FORCE_OPT, PRINT_JOBID_OPT, PRIORITY_OPT, DRAINED_OPT, PRIMARY_IP_VERSION_OPT, GetNodesSshPorts, SHOW_MACHINE_OPT, FormatQueryResult, HELPER_STARTUP_TIMEOUT_OPT, OFFLINE_OPT, YES_DOIT_OPT, NEW_CONFD_HMAC_KEY_OPT, UsesRPC, ZEROING_TIMEOUT_FIXED_OPT, ARGS_NONE, ALLOC_POLICY_OPT, ArgUnknown, SPECS_DISK_SIZE_OPT, ARGS_ONE_NETWORK, DEBUG_SIMERR_OPT, SUBMIT_OPTS, ARGS_MANY_NETWORKS, ROMAN_OPT, SEP_OPT, USE_EXTERNAL_MIP_SCRIPT, TRANSPORT_COMPRESSION_OPT, JobExecutor, SINGLE_NODE_OPT, INSTALL_IMAGE_OPT, SPICE_CACERT_OPT, OSPARAMS_SECRET_OPT, cli_option, HVOPTS_OPT, NEW_RAPI_CERT_OPT, ArgHost, GenericListFields, ArgCommand, IGNORE_OFFLINE_OPT, SPICE_CERT_OPT, NEW_CLUSTER_CERT_OPT, AddTags, RunWhileClusterStopped, BLK_OS_OPT, OS_OPT, USE_REPL_NET_OPT, REBOOT_TYPE_OPT, ToStdoutAndLoginfo, IGNORE_IPOLICY_OPT, GATEWAY6_OPT, ListTags, GetOnlineNodes, NODE_LIST_OPT, JobSubmittedException, COMPRESSION_TOOLS_OPT, FORCE_FAILOVER_OPT, ARGS_MANY_GROUPS, FormatLogMessage, GenericMain, ArgFile, WFSYNC_OPT, NORUNTIME_CHGS_OPT, ADD_RESERVED_IPS_OPT, ARGS_MANY_INSTANCES, FORCE_FILTER_OPT, FormatError, ArgSuggest, SubmitOrSend, NEW_SECONDARY_OPT, DISK_PARAMS_OPT, DST_NODE_OPT, cli, constants, opcodes, utils, errors, compat, ht, wconfd


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

Wconfd(opts, args)

source code 

Send commands to WConfD.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - the command to send, followed by the command-specific arguments
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"), cli_option("-i", "--interrup\
tible", default= False, dest= "interruptible", action= "store_true", h\
elp= "Allows the opcode to be interrupted by using a domain " "socket"\
...