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 653908 Details for
Bug 857106
ipmitool sol sessions stop responding
[?]
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]
rc1
ipmitool-1.8.12-keep-alive-tear-down.patch (text/plain), 7.83 KB, created by
Ales Ledvinka
on 2012-11-29 01:15:45 UTC
(
hide
)
Description:
rc1
Filename:
MIME Type:
Creator:
Ales Ledvinka
Created:
2012-11-29 01:15:45 UTC
Size:
7.83 KB
patch
obsolete
>diff -up ./include/ipmitool/ipmi_intf.h.ka ./include/ipmitool/ipmi_intf.h >--- ./include/ipmitool/ipmi_intf.h.ka 2012-11-29 01:01:50.590660521 +0100 >+++ ./include/ipmitool/ipmi_intf.h 2012-11-29 01:02:06.884664330 +0100 >@@ -83,11 +83,13 @@ struct ipmi_session { > int port; > int active; > int retry; >+ int solretry; > > uint32_t session_id; > uint32_t in_seq; > uint32_t out_seq; > uint32_t timeout; >+ uint32_t soltime; > > struct sockaddr_in addr; > socklen_t addrlen; >@@ -205,6 +207,8 @@ void ipmi_intf_session_set_port(struct i > void ipmi_intf_session_set_authtype(struct ipmi_intf * intf, uint8_t authtype); > void ipmi_intf_session_set_timeout(struct ipmi_intf * intf, uint32_t timeout); > void ipmi_intf_session_set_retry(struct ipmi_intf * intf, int retry); >+void ipmi_intf_session_set_soltime(struct ipmi_intf * intf, uint32_t soltime); >+void ipmi_intf_session_set_solretry(struct ipmi_intf * intf, int solretry); > void ipmi_cleanup(struct ipmi_intf * intf); > > #endif /* IPMI_INTF_H */ >diff -up ./lib/ipmi_main.c.ka ./lib/ipmi_main.c >--- ./lib/ipmi_main.c.ka 2012-11-29 01:01:50.594660525 +0100 >+++ ./lib/ipmi_main.c 2012-11-29 01:02:58.123675499 +0100 >@@ -74,7 +74,7 @@ > #endif > > #ifdef ENABLE_ALL_OPTIONS >-# define OPTION_STRING "I:hVvcgsEKYao:H:d:P:f:U:p:C:L:A:t:T:m:z:S:l:b:B:e:k:y:O:R:N:" >+# define OPTION_STRING "I:hVvcgsEKYao:H:d:P:f:U:p:C:L:A:t:T:m:z:S:l:b:B:e:k:y:O:R:N:r:n:" > #else > # define OPTION_STRING "I:hVvcH:f:U:p:d:S:" > #endif >@@ -253,6 +253,8 @@ ipmi_option_usage(const char * progname, > lprintf(LOG_NOTICE, " -O seloem Use file for OEM SEL event descriptions"); > lprintf(LOG_NOTICE, " -N seconds Specify timeout for lan [default=2] / lanplus [default=1] interface"); > lprintf(LOG_NOTICE, " -R retry Set the number of retries for lan/lanplus interface [default=4]"); >+ lprintf(LOG_NOTICE, " -n seconds Specify time between sol live check [default=15]"); >+ lprintf(LOG_NOTICE, " -r retry Set the number of retries for sol live check [default=3]"); > #endif > lprintf(LOG_NOTICE, ""); > >@@ -368,7 +370,9 @@ ipmi_main(int argc, char ** argv, > uint8_t my_long_packet_set=0; > uint8_t lookupbit = 0x10; /* use name-only lookup by default */ > int retry = 0; >+ int solretry = SOL_KEEPALIVE_RETRIES; > uint32_t timeout = 0; >+ uint32_t soltime = SOL_KEEPALIVE_TIMEOUT; > int authtype = -1; > char * tmp = NULL; > char * hostname = NULL; >@@ -709,6 +713,22 @@ ipmi_main(int argc, char ** argv, > goto out_free; > } > break; >+ /* SOL Life check Retry and Time interval */ >+ case 'r': >+ if (str2int(optarg, &solretry) != 0 || solretry < 0) { >+ lprintf(LOG_ERR, "Invalid parameter given or out of range for '-r'."); >+ rc = -1; >+ goto out_free; >+ } >+ break; >+ case 'n': >+ if (str2uint(optarg, &soltime) != 0) { >+ lprintf(LOG_ERR, "Invalid parameter given or out of range for '-n'."); >+ rc = -1; >+ goto out_free; >+ } >+ break; >+ > #endif > default: > ipmi_option_usage(progname, cmdlist, intflist); >@@ -813,6 +833,11 @@ ipmi_main(int argc, char ** argv, > ipmi_intf_session_set_retry(ipmi_main_intf, retry); > if (timeout > 0) > ipmi_intf_session_set_timeout(ipmi_main_intf, timeout); >+ /* Adding sol retry and time interval for interface that support it */ >+ if (solretry > 0) >+ ipmi_intf_session_set_solretry(ipmi_main_intf, solretry); >+ if (soltime > 0) >+ ipmi_intf_session_set_soltime(ipmi_main_intf, soltime); > > ipmi_intf_session_set_lookupbit(ipmi_main_intf, lookupbit); > ipmi_intf_session_set_sol_escape_char(ipmi_main_intf, sol_escape_char); >diff -up ./lib/ipmi_sol.c.ka ./lib/ipmi_sol.c >--- ./lib/ipmi_sol.c.ka 2012-11-29 01:01:50.602660533 +0100 >+++ ./lib/ipmi_sol.c 2012-11-29 01:02:06.893664339 +0100 >@@ -71,8 +71,6 @@ > #define SOL_PARAMETER_SOL_PAYLOAD_CHANNEL 0x07 > #define SOL_PARAMETER_SOL_PAYLOAD_PORT 0x08 > >-#define MAX_SOL_RETRY 6 >- > const struct valstr sol_parameter_vals[] = { > { SOL_PARAMETER_SET_IN_PROGRESS, "Set In Progress (0)" }, > { SOL_PARAMETER_SOL_ENABLE, "Enable (1)" }, >@@ -92,7 +90,6 @@ static struct termios _saved_tio; > static int _in_raw_mode = 0; > static int _disable_keepalive = 0; > static int _use_sol_for_keepalive = 0; >-static int _keepalive_retries = 0; > > extern int verbose; > >@@ -1471,7 +1468,7 @@ static int > ipmi_sol_keepalive_using_sol(struct ipmi_intf * intf) > { > struct ipmi_v2_payload v2_payload; >- struct ipmi_rs * rsp = NULL; >+ struct ipmi_rs * rsp = NULL; > struct timeval end; > > int ret = 0; >@@ -1481,15 +1478,17 @@ ipmi_sol_keepalive_using_sol(struct ipmi > > gettimeofday(&end, 0); > >- if (end.tv_sec - _start_keepalive.tv_sec > SOL_KEEPALIVE_TIMEOUT) { >- memset(&v2_payload, 0, sizeof(v2_payload)); >- >- v2_payload.payload.sol_packet.character_count = 0; >- >- rsp = intf->send_sol(intf, &v2_payload); >+ if ((end.tv_sec - _start_keepalive.tv_sec) > intf->session->soltime) { >+ memset(&v2_payload, 0, sizeof(v2_payload)); >+ v2_payload.payload.sol_packet.character_count = 0; >+ >+ rsp = intf->send_sol(intf, &v2_payload); >+ if (NULL == rsp) >+ ret = 1; > > gettimeofday(&_start_keepalive, 0); >- } >+ } else >+ ret = -1; > return ret; > } > >@@ -1504,16 +1503,14 @@ ipmi_sol_keepalive_using_getdeviceid(str > > gettimeofday(&end, 0); > >- if (end.tv_sec - _start_keepalive.tv_sec > SOL_KEEPALIVE_TIMEOUT) { >- ret = intf->keepalive(intf); >- if ( (ret!=0) && (_keepalive_retries < SOL_KEEPALIVE_RETRIES) ) { >- ret = 0; >- _keepalive_retries++; >- } >- else if ((ret==0) && (_keepalive_retries > 0)) >- _keepalive_retries = 0; >+ if ((end.tv_sec - _start_keepalive.tv_sec) > intf->session->soltime) { >+ >+ ret = intf->keepalive(intf); >+ if (ret!=0) >+ ret = 1; > gettimeofday(&_start_keepalive, 0); >- } >+ } else >+ ret = -1; > return ret; > } > >@@ -1562,8 +1559,10 @@ ipmi_sol_red_pill(struct ipmi_intf * int > { > keepAliveRet = ipmi_sol_keepalive_using_sol(intf); > } >- >- if (keepAliveRet != 0) >+ /* -1 line silence interval >+ * 0 disabled or valid reply >+ * 1 no reply in the check interval */ >+ if (keepAliveRet > 0) > { > /* > * Retrying the keep Alive before declaring a communication >@@ -1573,7 +1572,7 @@ ipmi_sol_red_pill(struct ipmi_intf * int > * this down time when the connection is restarting, SOL will > * exit even though the IPMC is available and the session is open. > */ >- if (retrySol == MAX_SOL_RETRY) >+ if (retrySol == intf->session->solretry) > { > /* no response to Get Device ID keepalive message */ > bShouldExit = 1; >@@ -1584,7 +1583,7 @@ ipmi_sol_red_pill(struct ipmi_intf * int > retrySol++; > } > } >- else >+ else if (0 == keepAliveRet) > { > /* if the keep Alive is successful reset retries to zero */ > retrySol = 0; >@@ -1809,7 +1808,10 @@ ipmi_sol_activate(struct ipmi_intf * int > #endif > > >- intf->session->timeout = 1; >+ intf->session->timeout = 1; /* XXX: undocumented, overrides cmd line, >+ * repeated input on high RTT link and slow overloaded BMC? >+ * 3 reasons to remove. why is it here? >+ * cvs [annotate aborted]: reading from server: Connection reset by peer */ > > > /* NOTE: the spec does allow for SOL traffic to be sent on >diff -up ./src/plugins/ipmi_intf.c.ka ./src/plugins/ipmi_intf.c >--- ./src/plugins/ipmi_intf.c.ka 2012-11-29 01:01:50.598660529 +0100 >+++ ./src/plugins/ipmi_intf.c 2012-11-29 01:02:06.924664364 +0100 >@@ -303,6 +303,24 @@ ipmi_intf_session_set_retry(struct ipmi_ > } > > void >+ipmi_intf_session_set_soltime(struct ipmi_intf * intf, uint32_t soltime) >+{ >+ if (intf->session == NULL) >+ return; >+ >+ intf->session->soltime = soltime; >+} >+ >+void >+ipmi_intf_session_set_solretry(struct ipmi_intf * intf, int solretry) >+{ >+ if (intf->session == NULL) >+ return; >+ >+ intf->session->solretry = solretry; >+} >+ >+void > ipmi_cleanup(struct ipmi_intf * intf) > { > ipmi_sdr_list_empty(intf);
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 857106
: 653908