Summary: | ASTERISK-27590: res_corosync doesn't load in builds after version 13.17.1 | ||
Reporter: | Isaac McDonald (imcdona) | Labels: | |
Date Opened: | 2018-01-16 11:01:29.000-0600 | Date Closed: | 2018-01-24 14:05:51.000-0600 |
Priority: | Major | Regression? | Yes |
Status: | Closed/Complete | Components: | Resources/res_corosync |
Versions: | 13.17.2 13.18.0 13.18.1 13.18.2 13.18.3 13.18.4 13.18.5 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | CentOS Linux release 7.4.1708 (Core) Corosync Cluster Engine, version '2.4.0' | Attachments: | |
Description: | Something changed after Asterisk 13.17.1 that broke res_corosync. I've installed the latest version 13.19.0 and corosync is still broken. This is especially frustrating seeing as how the corosync module was recently fixed after being broke for 2 years only to be broken again after a couple builds.
I think this commit may have something to do with it: {noformat} 2017-10-06 10:51 +0000 [0a11097a22] Matt Jordan <mjordan@digium.com> * res_corosync: Fix linking issue with Corosync 2.x At some point in time in the history of Corosync (certainly within the 2.x branch), the corosync_cfg_state_track function was removed. Unfortunately, the cfg library is only linked if this function is present. Without the cfg library being linked to res_corosync, loading of res_corosync will fail. This patch makes it so that detecting corosync's core libraries, determined by the COROSYNC external library checks, links both the cpg and cfg libraries with res_corosync. Change-Id: I674e9e1c8fea11c3bf81154aaa7c1fd43f945465 {noformat} Here's the error that's produced in the log when trying to load the module: {noformat} loader.c: Error loading module 'res_corosync.so': /usr/lib/asterisk/modules/res_corosync.so: undefined symbol: corosync_cfg_fd_get {noformat} Here is the ticket for the corosync module that was resolved several months ago along with the patches and other info if it helps. ASTERISK-25370 https://github.com/corosync/corosync/issues/57 https://gerrit.asterisk.org/#/c/5858/ https://gerrit.asterisk.org/5859 https://gerrit.asterisk.org/5857 If I can provide any additional details or logs please let me know. | ||
Comments: | By: Asterisk Team (asteriskteam) 2018-01-16 11:01:30.108-0600 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: George Joseph (gjoseph) 2018-01-17 10:33:21.680-0600 I just tried in CentOS7 and Fedora27 and had no issues building or running res_corosync. Can you verify that the packages corosync, corosynclib and corosynclib-devel are installed? Can you do a "yum reinstall" and try again? Can you verify... {noformat} $ find /usr/lib64 -name '*coro*' ./pkgconfig/corosync.pc ./pkgconfig/libcorosync_common.pc ./asterisk/modules/res_corosync.so ./libcorosync_common.so.4 ./libcorosync_common.so.4.0.0 ./libcorosync_common.so {noformat} Oh, are you doing a 32 or 64 bit build? By: Isaac McDonald (imcdona) 2018-01-22 09:27:37.079-0600 I'm building 64bit Package corosynclib-2.4.0-9.el7_4.2.x86_64 already installed and latest version Package corosynclib-devel-2.4.0-9.el7_4.2.x86_64 already installed and latest version Package corosync-2.4.0-9.el7_4.2.x86_64 already installed and latest version The Corosync modules compiles and works if I install Asterisk 13.13 for example. find /usr/lib64 -name '*coro*' /usr/lib64/pkgconfig/corosync.pc /usr/lib64/pkgconfig/libcorosync_common.pc /usr/lib64/libcorosync_common.so.4 /usr/lib64/libcorosync_common.so.4.0.0 /usr/lib64/libcoroipcc.so.4.0.0 /usr/lib64/libcoroipcc.so /usr/lib64/libcorosync_common.so /usr/lib64/libcoroipcc.so.4 here's uname -a: Linux pbx4.ipt.oneeighty.com 3.10.0-514.16.1.el7.x86_64 #1 SMP Wed Apr 12 15:04:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux I'm going to rebuild a box from scratch and see if I can get corosync to load properly. By: Isaac McDonald (imcdona) 2018-01-22 09:31:52.725-0600 For clarification, I'm not having issues building res_corosync. The module builds fine, it merely won't load. Have you verified the module actually loads after you're compiled it? By: George Joseph (gjoseph) 2018-01-22 09:33:26.445-0600 OK, let us know how it goes. What's /usr/lib64/libcoroipcc.so? It doesn't seem to be provided by any CentOS package. By: Isaac McDonald (imcdona) 2018-01-23 12:56:10.415-0600 I was able to compile and load res_corosync.so on fresh install of CentOS 7. This indicates there's something with my install that's causing this issue. Prior to ASTERISK-25370 being fixed the only way to get Corosync working with Asterisk was to manually compile and install Corosync 1.4.8 since CentOS only provides packages for Corosync 2.x. libcoroipcc.so is a library leftover from the Corosync 1.x install that isn't removed when Corosync 1.x is uninstalled. After manually removing those additional libraries and removing all files and directories that contained "corosync" I did an ldconfig and then re-compiled Asterisk and got the same result when trying to load res_corosync.so. Even with the extra Corosync 1.x libraries on the system the Corosync module used to compile properly in earlier versions of Asterisk. What changed between then and now? Could there be additional Corosync 1.x libraries that the configure script is finding that's causing this issue? FWIW if you want to test for yourself you can grab Corosync 1.4.8 from here wget http://build.clusterlabs.org/corosync/releases/corosync-1.4.8.tar.gz and do the usual ./configure, make, make install By: George Joseph (gjoseph) 2018-01-23 15:24:25.270-0600 When you configure asterisk do you explicitly set '--libdir=/usr/lib64'? If not, then asterisk will install to /usr/lib instead of /usr/lib64. If you also have the .i686 corosync packages installed, maybe they're getting picked up from /usr/lib as well or an earlier manual install of corosync left some there that shouldn't be there. Anyway, check and clean /usr/lib and reconfigure asterisk with --libdir=/usr/lib64. Of course, also check /usr/local/lib and /usr/local/lib64. By: Isaac McDonald (imcdona) 2018-01-24 13:11:55.294-0600 I've been testing on Asterisk 13.18.5. this whole time not realizing that 13.19.0 was out. Suffice to say that 13.19.0 works as expected. Res_corosync compiles and loads as expected with no additional changes required. (eg the old corosync 1.x libraries are still installed) Not sure what changed in 13.19.0 but works. Thanks for your help on this. We can close this one out. |