Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 245951 Details for
Bug 362351
[RFE] make fence_xvmd not need a cluster for 1-node operation
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Backported / tested patch from mainline
fence_xvmd-nocluster-rhel5.patch (text/plain), 4.72 KB, created by
Lon Hohberger
on 2007-11-01 18:50:44 UTC
(
hide
)
Description:
Backported / tested patch from mainline
Filename:
MIME Type:
Creator:
Lon Hohberger
Created:
2007-11-01 18:50:44 UTC
Size:
4.72 KB
patch
obsolete
>Index: fence_xvmd.c >=================================================================== >RCS file: /cvs/cluster/cluster/fence/agents/xvm/fence_xvmd.c,v >retrieving revision 1.4.2.7 >retrieving revision 1.13 >diff -u -r1.4.2.7 -r1.13 >--- fence_xvmd.c 17 Oct 2007 18:21:29 -0000 1.4.2.7 >+++ fence_xvmd.c 17 Oct 2007 18:29:57 -0000 1.13 >@@ -221,7 +221,7 @@ > do_fence_request_tcp(fence_req_t *req, fence_auth_type_t auth, > void *key, size_t key_len, virConnectPtr vp) > { >- int fd, ret = -1; >+ int fd = -1, ret = -1; > virDomainPtr vdp; > char response = 1; > char *domain_desc, *domain_desc_sanitized; >@@ -534,10 +534,10 @@ > struct sockaddr_in sin; > int len; > int n; >- int my_id; >+ int my_id = 1; > socklen_t slen; > fence_req_t data; >- virConnectPtr vp; >+ virConnectPtr vp = NULL; > virt_list_t *vl = NULL; > virt_state_t *dom = NULL; > >@@ -545,7 +545,9 @@ > if (!vp) > perror("virConnectOpen"); > >- get_cman_ids(ch, &my_id, NULL); >+ if (!(args->flags & F_NOCLUSTER)) >+ get_cman_ids(ch, &my_id, NULL); >+ > printf("My Node ID = %d\n", my_id); > > if (vp) { >@@ -585,11 +587,14 @@ > /* Update list of VMs from libvirt. */ > virt_list_update(vp, &vl, my_id); > vl_print(vl); >+ > /* Store information here */ >- if (args->flags & F_USE_UUID) >- store_domains_by_uuid(h, vl); >- else >- store_domains_by_name(h, vl); >+ if (!(args->flags & F_NOCLUSTER)) { >+ if (args->flags & F_USE_UUID) >+ store_domains_by_uuid(h, vl); >+ else >+ store_domains_by_name(h, vl); >+ } > > /* > * If no requests, we're done >@@ -631,7 +636,7 @@ > dom = vl_find_uuid(vl, (char *)data.domain); > else > dom = vl_find_name(vl, (char *)data.domain); >- if (!dom) { >+ if (!dom && !(args->flags & F_NOCLUSTER)) { > handle_remote_domain(ch, h, &data, args->auth, > key, key_len, my_id); > continue; >@@ -682,9 +687,9 @@ > int mc_sock; > char key[4096]; > int key_len = 0, x; >- char *my_options = "dfi:a:p:C:c:k:u?hV"; >- cman_handle_t ch; >- void *h; >+ char *my_options = "dfi:a:p:C:c:k:u?hLXV"; >+ cman_handle_t ch = NULL; >+ void *h = NULL; > > args_init(&args); > args_get_getopt(argc, argv, my_options, &args); >@@ -745,32 +750,34 @@ > return 1; > } > >- /* Wait for cman to start. */ >- x = 0; >- while ((ch = cman_init(NULL)) == NULL) { >- if (!x) { >- printf("Could not connect to CMAN; retrying...\n"); >- x = 1; >- } >- sleep(3); >- } >- if (x) >- printf("Connected to CMAN\n"); >- /* Wait for quorum */ >- while (!cman_is_quorate(ch)) >- sleep(3); >- >- /* Wait for openais checkpointing to become available */ >- x = 0; >- while ((h = ckpt_init("vm_states", 262144, 4096, 64, 10)) == NULL) { >- if (!x) { >- printf("Could not initialize saCkPt; retrying...\n"); >- x = 1; >+ if (!(args.flags & F_NOCLUSTER)) { >+ /* Wait for cman to start. */ >+ x = 0; >+ while ((ch = cman_init(NULL)) == NULL) { >+ if (!x) { >+ printf("Could not connect to CMAN; retrying...\n"); >+ x = 1; >+ } >+ sleep(3); >+ } >+ if (x) >+ printf("Connected to CMAN\n"); >+ /* Wait for quorum */ >+ while (!cman_is_quorate(ch)) >+ sleep(3); >+ >+ /* Wait for openais checkpointing to become available */ >+ x = 0; >+ while ((h = ckpt_init("vm_states", 262144, 4096, 64, 10)) == NULL) { >+ if (!x) { >+ printf("Could not initialize saCkPt; retrying...\n"); >+ x = 1; >+ } >+ sleep(3); > } >- sleep(3); >+ if (x) >+ printf("Checkpoint initialized\n"); > } >- if (x) >- printf("Checkpoint initialized\n"); > > if (args.family == PF_INET) > mc_sock = ipv4_recv_sk(args.addr, args.port); >Index: options.c >=================================================================== >RCS file: /cvs/cluster/cluster/fence/agents/xvm/options.c,v >retrieving revision 1.2.2.1 >retrieving revision 1.5 >diff -u -r1.2.2.1 -r1.5 >--- options.c 13 Nov 2006 16:14:06 -0000 1.2.2.1 >+++ options.c 26 Jun 2007 17:23:41 -0000 1.5 >@@ -253,6 +253,13 @@ > } > > >+static inline void >+assign_nocluster(fence_xvm_args_t *args, struct arg_info *arg, char *value) >+{ >+ args->flags |= F_NOCLUSTER; >+} >+ >+ > /** ALL valid command line and stdin arguments for this fencing agent */ > static struct arg_info _arg_info[] = { > { '\xff', NULL, "agent", >@@ -326,6 +333,10 @@ > { 'X', "-X", NULL, > "Do not connect to CCS for configuration", > assign_noccs }, >+ >+ { 'L', "-L", NULL, >+ "Local mode only (no cluster)", >+ assign_nocluster }, > > { 'V', "-V", NULL, > "Display version and exit", >Index: options.h >=================================================================== >RCS file: /cvs/cluster/cluster/fence/agents/xvm/options.h,v >retrieving revision 1.1.2.1 >retrieving revision 1.3 >diff -u -r1.1.2.1 -r1.3 >--- options.h 13 Nov 2006 16:14:06 -0000 1.1.2.1 >+++ options.h 26 Jun 2007 17:23:41 -0000 1.3 >@@ -27,7 +27,8 @@ > F_USE_UUID = 0x10, > F_VERSION = 0x20, > F_CCSERR = 0x40, >- F_CCSFAIL = 0x80 >+ F_CCSFAIL = 0x80, >+ F_NOCLUSTER = 0x100 > } arg_flags_t; > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 362351
: 245951