[MCOL-939] mysqld logs wrong columnstore version number Created: 2017-09-26  Updated: 2018-02-01  Resolved: 2018-01-19

Status: Closed
Project: MariaDB ColumnStore
Component/s: MariaDB Server
Affects Version/s: 1.0.11, 1.1.0, 1.1.2
Fix Version/s: 1.1.3

Type: Bug Priority: Minor
Reporter: David Hall (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: relnote

Issue Links:
Duplicate
is duplicated by MCOL-531 Version number reported incorrectly i... Closed
Sprint: 2017-24, 2017-25, 2018-01, 2018-02

 Description   

Looking in the mysqld.log during start up you will see the following:

170926 10:05:49 Columnstore: Started; Version: 1.0.2-1
170926 10:05:49 InfiniDB: Started; Version: 1.0.2-1
.
.
.
Version: '10.1.26-MariaDB-debug' socket: '/usr/local/mariadb/columnstore/mysql/lib/mysql/mysql.sock' port: 3306 Columnstore 1.0.11-2

It gets started version from the file dbcon/mysql/versionnumber.h

Either we need to automate the number in this file, or eliminate it.



 Comments   
Comment by David Thompson (Inactive) [ 2017-09-26 ]

ben, i think you worked on adding the version templating. I assume we have an engine method somewhere to retrieve this?

Comment by Andrew Hutchings (Inactive) [ 2017-09-26 ]

This is a duplicate of MCOL-531

Comment by Roman [ 2017-11-16 ]

Greetings,

What do you think about the solution? I reused data from VERSION and macroses from columnstore_version.cmake to generate dbconn/mysql/versionheader.h
There is a utils/configcpp/versionnumber.h that is used nowhere. Should I remove it with this patch?

Comment by Ben Thompson (Inactive) [ 2017-11-20 ]

The propsed fix should work, however, I think I would prefer to use this as an oppurtunity to cleanup and fix how we handle getting version strings that currently happens in multiple locations in multiple methods. I would propose we move versionnumber.h.in from the current engine/dbcon/mysql to top level of engine source, and remove engine/dbcon/mysql/versionnumber.h and engine/utils/configcpp/versionnumber.h.

I would also rename the generated strings from the header away from "idb_" to "columnstore_".

This new generated versionnumber.h.in would replace the current text file releasenum generated here at engine/CMakeLists.txt:79

CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/releasenum.in ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum @ONLY IMMEDIATE)

This file is still being used to currently get the same strings in a much uglier way via liboamcpp.cpp void Oam::getSystemSoftware(SystemSoftware& systemsoftware). And requires cleaning up the code where its used to use the values provided to versionnumber.h

Also, not attached to name of versionnumber.h and would possible prefer something along the lines of columnstoreversion.h

Comment by Roman [ 2017-11-21 ]

I'll reconcider the changes according with your advices.

Comment by Roman [ 2017-11-23 ]

The file engine/build/releasenum is connected deeply then I thought. It is used by different shell scripts as a source of version information and even as marker in oamapps/serverMonitor/diskMonitor.cpp:225. Should I change this shells which are used for building packages while doing this issue or better make it separetely?
The patch is ready(except releasenum) and I'm testing it.

Comment by Roman [ 2017-11-26 ]

There are two pull requests here and here that were made according with the advices. I decided to postpone releasenum removal until I get your opinion on this matter.

Comment by Ben Thompson (Inactive) [ 2017-12-01 ]

I think its safe to remove releasenum as most references are from older files no longer used by ColumnStore and the few that are still used can be handled with these changes

The file oamapps/serverMonitor/diskMonitor.cpp can replace:
fileName = deviceName + "usr/local/mariadb/columnstore/releasenum";
with this:
fileName = deviceName + "usr/local/mariadb/columnstore/";

These files can all be removed:
build/bootstrap
build/bootstrap4.5
build/BuildCalpontVersion.bat
build/genVersion.sh
build/build_rpms
build/columnstore.community.spec.in
build/columnstore.spec.in
build/infinidb.spec.in
build/infinidb.spec.in.4.5
build/make_src_tar
tools/configMgt/buildCalpontPackages.sh
tools/configMgt/calpont-build
tools/configMgt/dm_parent_installer.sh
tools/configMgt/dm_parent_installer_v3.sh
tools/configMgt/parent_binary_installer.sh
tools/configMgt/parent_binary_installer_v3.sh
tools/configMgt/pm_parent_installer.sh
tools/configMgt/pm_parent_installer_v3.sh
tools/configMgt/stackReleaseChecker.cpp

Also, remove the references to releasenum from CMake files.

The references in softwareReport.sh can be replaced:
cat $INSTALLDIR/releasenum
with this:
$INSTALLDIR/bin/mcsadmin getsoftwareinfo

Comment by Roman [ 2017-12-12 ]

Made a new pull request that contains all the mentioned changes.

Comment by Andrew Hutchings (Inactive) [ 2017-12-15 ]

New code to review

Comment by Ben Thompson (Inactive) [ 2017-12-19 ]

Made couple of small cleanup changes for packaging and .gitignore.

Test should verify fix in the mysqld log file as issue in description states and verify it is correct anywhere shown in other logs or mcsadmin as some changes were made so they all get the version information from same place now.

Comment by Daniel Lee (Inactive) [ 2018-01-19 ]

Build verified: Github source 1.1.3-1
/root/columnstore/mariadb-columnstore-server
commit e0ae0d2fecf9941887478d9aa669c8b2d1092090
Merge: 21ec501 2490ddf
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Fri Jan 19 12:39:05 2018 -0600
Merge pull request #84 from mariadb-corporation/MCOL-1159
MCOL-1159 Merge mariadb-10.2.12
/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit 201813d63d63e99e50f2474d1bf7d8428ac72119
Merge: 3748036 a002d33
Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
Date: Fri Jan 19 19:40:18 2018 +0000
Merge pull request #373 from mariadb-corporation/MergeFix
Merge deleted change to include columnstoreversion.h

Verified the mysql/db/*.err file showed the correct release version number:

180119 20:06:57 Columnstore: Started; Version: 1.1.3-1
180119 20:06:57 Columnstore: Started; Version: 1.1.3-1

the mariadb/columnstore/releasenum no longer exists

Comment by Zdravelina Sokolovska (Inactive) [ 2018-02-01 ]

similar problem is observed on mcs v1.1.2-1 :
mismatched versions are seen in the log : there is once correct socket: '/usr/local/mariadb/columnstore/mysql/lib/mysql/mysql.sock' port: 3306 Columnstore 1.1.2-1
but then is printed obsoleted one
180201 16:29:32 Columnstore: Started; Version: 1.0.2-1

2018-02-01 16:21:56 140050877044800 [Note] Recovering after a crash using /usr/local/mariadb/columnstore/mysql/db/mysql-bin
2018-02-01 16:21:56 140050877044800 [Note] Starting crash recovery...
2018-02-01 16:21:56 140050877044800 [Note] Crash recovery finished.
2018-02-01 16:21:56 140050877044800 [Note] Server socket created on IP: '::'.
2018-02-01 16:21:56 140050877044800 [Note] Reading of all Master_info entries succeded
2018-02-01 16:21:56 140050877044800 [Note] Added new Master_info '' to hash table
2018-02-01 16:21:56 140050877044800 [Note] /usr/local/mariadb/columnstore/mysql//bin/mysqld: ready for connections.
Version: '10.2.10-MariaDB-log'  socket: '/usr/local/mariadb/columnstore/mysql/lib/mysql/mysql.sock'  port: 3306  Columnstore 1.1.2-1
180201 16:29:32 mysqld_safe Number of processes running now: 0
180201 16:29:32 mysqld_safe mysqld restarted
2018-02-01 16:29:32 139713187153984 [Note] /usr/local/mariadb/columnstore/mysql//bin/mysqld (mysqld 10.2.10-MariaDB-log) starting as process 13440 ...
180201 16:29:32 Columnstore: Started; Version: 1.0.2-1
180201 16:29:32 InfiniDB: Started; Version: 1.0.2-1

Comment by Andrew Hutchings (Inactive) [ 2018-02-01 ]

Hi winstone,

Yes it is. The fix will be in 1.1.3.

Comment by Zdravelina Sokolovska (Inactive) [ 2018-02-01 ]

LinuxJedi, have just updated the Affects Version/s: list with 1.1.2-1

Generated at Thu Feb 08 02:24:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.