Data Protection
Data Protection
Hello,
I'm trying to use snapcreator 3.3 with mysql. But this doesn't work.
I can confirm that this works:
mysql -h 127.0.0.1 -P 3306 -u root -p demo
I've attached the config file. Any ideas?
Greets Jean-Marc
Hello,
the snapcreator mysql plugin seems to use Net::MySQL, which is quite old (latest version 0.09 = March 2006)
I did some googling and I found this:
List of Net::MySQL Bugs: https://rt.cpan.org/Public/Dist/Display.html?Name=Net-MySQL
A bug description and a possible fix (not included in the latest version) for my problem:
https://rt.cpan.org/Public/Bug/Display.html?id=21462
Best regards
jm
Hi Jean-Marc,
What version of MySQL server and Client are you running? Also did you try installing the MySQL-devel package? Your SC config file looks good.
SC 3.3 supports following MySQL versions according to IMT http://now.netapp.com/matrix :
MySQL Enterprise Server 5.1.30
MySQL Enterprise Server 5.1.31
MySQL Enterprise Server 5.1.32
MySQL Enterprise Server 5.1.33
MySQL Enterprise Server 5.1.34
MySQL Enterprise Server 5.1.35
MySQL Enterprise Server 5.1.36
MySQL Enterprise Server 5.1.37
MySQL Enterprise Server 5.1.38
MySQL Enterprise Server 5.1.39
MySQL Enterprise Server 5.1.40
MySQL Enterprise Server 5.1.41
MySQL Enterprise Server 5.1.42
MySQL Enterprise Server 5.1.43
MySQL Enterprise Server 5.1.44
MySQL Enterprise Server 5.1.45
MySQL Enterprise Server 5.1.46
MySQL Enterprise Server 5.1.47
MySQL Enterprise Server 5.1.48
MySQL Enterprise Server 5.1.49
MySQL Enterprise Server 5.1.50
MySQL Enterprise Server 5.1.51
MySQL Enterprise Server 5.1.52
I think probably this is a compadibility issue between Net::MySQL and MySQL client libs. We will try and reproduce this issue and find a solution. The best thing you can do is if your config is supported open an NGS support case. This will force a BURT to be opened and the problem will be addressed much quicker.
Best Regards,
Keith
Hello Keith,
My bad. i didn't chek the compatibility matrix. I was testing with centos 5.5, which has only MySQL 5.0.77
I wanted to test with RHEL6 x86_64 but it's no listed in the compatibility list either.
Thanks.
Jean-Marc
No problem
SC will run on centOS and redhat6. There isn't NGS support for that but that doesnt prevent you from providing a solution. You can still use SC as basis to quickly get a scripting solution going. This saves time and provides the customer I think with a great solution.
If the MySQL plugin doesn't work (has issues with certain versions) the try using mysql cli in combo with APP_QUIESCE_CMDS and APP_UNQUIESCE_CMDS. If you want any further help getting that going then let us know. We are happy to help!
Keith
Actually I tried on RHE6 x86_64 too. It is a minimal install, so some libraries are possibly missing.
I'll take a look after my holidays
I get this
You can either turn off HTTPS
PORT=80
TRANSPORT=HTTP
OR
Install the openssl-devel rpm. The ontap apis use Net::SSLeay and it links into ssl libraries in OS, looks like it cant find them. We link dynamically meaning you have to install openssl-devel package. Mostly this is installed but sometimes not. Let me know if this fixes the issue.
Keith
A quick Feedback:
When I trun off ssl, it works. The mysql user needs one more privilege too (if you don't use root):
mysql> update user set Reload_priv="Y" where user="demo";
mysq> flush privileges;
I install openssl and openssl-devel rpm packages (bot i686 and x86_64). But won't work too.
The solution is:
# yum install openssl098e-0.9.8e-17.el6.i686
and bingo it works!
Thanks for the help
Greets jm
Hi,
I have also done the same script creation for SC with KVM without APP_NAME. it works pretty well. We demonstrated to airtel india customer.
Thanks for having such a custom flexibility in SC
Thanks
Karthikeyan.N
A workaround solution to this problem is simply not use MYSQL plugin.
You can try using mysql command to send sql needed to quiesce/unquiesce MySQL
APP_QUIESCE_CMD01=mysql <arguments> <sql query=flush tables with read lock>
APP_QUIESCE_CMD02=mysql <arguments> <sql query=flush logs>
APP_UNQUIESCE_CMD01=mysql <arguments> <sql query=unlock tables>
PRE_EXIT_CMD01=mysql <arguments> <sql query=unlock tables>
Quiesce SQL:
flush tables with read lock
flush logs
Unquiesce SQL:
unlock tables
Let us know if this helps?
Regards,
Keith
Hello Keith,
The workaround is working. In the config file, you have to modify the following line too:
APP_NAME=mysql => APP_NAME=
Actually one could write a small perl script wraper to quiesce/unquiesce the db. The needed infos are available as environment variables. I'll have a look at tthis
and try to make this work on rhel6 too.
Thanks
Jean-Marc
Yep I forgot about APP_NAME. You have to turn that off, that basically turns off plugin and allows you to work with quiesce|unquiesce|pre_exit cmds.
If you figure this out please share your scripts and config file, this type of knowledge really helps everyone in the SC community.
Good Luck!
Keith
One more thing. You mention perl, if you are interested you can create your own plugin (plugin framework is perl). There is a TR (below) which explains how to program a community plugin. This would take more time to create than wrapper scripts but if you plan on re-using your plugin and providing a unique solution (your own SnapManager using Snap Creator) you are welcome to do so.
In future releases we are looking at adding support so folks can write plugins in other languages (powershell, etc) and not just perl.
http://media.netapp.com/documents/tr-3890.pdf
Regards,
Keith
Hi Sorry for the stupid question but when you say not using Mysql pluglin but instead add
A workaround solution to this problem is simply not use MYSQL plugin .
You can try using mysql command to send sql needed to quiesce/unquiesce MySQL
APP_QUIESCE_CMD01=mysql <arguments> <sql query=flush tables with read lock>
APP_QUIESCE_CMD02=mysql <arguments> <sql query=flush logs>
APP_UNQUIESCE_CMD01=mysql <arguments> <sql query=unlock tables>
PRE_EXIT_CMD01=mysql <arguments> <sql query=unlock tables>
My question is , where I have to put it?
Many thanks in advanced
Al
Well you have a couple of issues
1) Redhat throwing SSL errors. This is because some shared library links are missing.
The requirements for HTTPS for Linux/Unix are as follows:
* openssl package
* SSL symlinks
Make sure the following symlinks are located under /usr/lib oder /usr/lib64 (depending on if OS is 64bit or not)
libssl.so.6
libcrypto.so.6
If the symlinks dont exist please cd to /usr/lib or /usr/lib64 and run following command to link them. Make sure what we are linking to is installed, again pre-requisite is openssl so it should be installed first.
ln -sf libssl.so.0.9.8 libssl.so.6
ln -sf libcrypto.so.0.9.8 libcrypto.so.6
2) MySQL plugin not working. This looks to me on second review that you are trying to use MySQL plugin remotely. I would try using an agent. So install agent on MySQL host and then set HOST=localhost in config. If this doesnt work then it is some connection issue with MySQL. As a workaround to this if you cant figure it out you can use the following commands in config file (this means commenting out APP_NAME=mysql #APP_NAME=mysql in config):
APP_QUIESCE_CMD01=mysql <arguments> <sql query=flush tables with read lock>
APP_QUIESCE_CMD02=mysql <arguments> <sql query=flush logs>
APP_UNQUIESCE_CMD01=mysql <arguments> <sql query=unlock tables>
PRE_EXIT_CMD01=mysql <arguments> <sql query=unlock tables>
You would need to configure these in the config file under scServer/configs/<profile>/<conf file>
Regards,
Keith