|
From: Peter C. <cz...@ba...> - 2011-02-17 08:17:46
|
Hello, This morning I also added postgresql 9.0 to the mix. "make check" failed at test_pgsql.sh. I was running it as root, and postgresql scripts don't like it. So there was an attempt to su to user postgres. There are two problems with it: - on FreeBSD su is in /usr/bin (not in /bin, as the script expects) - there is no postgres user So I compiled libdbi-drivers as user czanik, ran make check, and now I have: ================== All 3 tests passed ================== Plans for today: - test all of these on openSUSE 11.4 RC1 - test it with syslog-ng on local and network connections, using default and non default port numbers (I was told, that using non-default port numbers is problematic) Bye, -- Peter Czanik (CzP) <cz...@ba...> BalaBit IT Security / syslog-ng upstream http://czanik.blogs.balabit.com/ |
|
From: <mar...@mh...> - 2011-02-17 21:13:55
|
Hi Peter, Peter Czanik writes: > Hello, > This morning I also added postgresql 9.0 to the mix. "make check" failed > at test_pgsql.sh. I was running it as root, and postgresql scripts don't > like it. So there was an attempt to su to user postgres. There are two > problems with it: > - on FreeBSD su is in /usr/bin (not in /bin, as the script expects) > - there is no postgres user The test scripts were donated by the Ubuntu and Debian maintainers. They still contain some OS-specific stuff. I'm not yet sure how to deal with this. In contrast to other stuff, the "make check" stuff should run on any platform without platform-specific patches. So how do we find out whether or not we have to su to a particular user in order to do administrative tasks on the server? Is it only Debian-based OSes that handle postgresql access this way? If that were the case, we could add some code to ./configure to make sure this test is run appropriately. > So I compiled libdbi-drivers as user czanik, ran make check, and now I have: > ================== > All 3 tests passed > ================== > Actually, I always build software in my regular account. To the best of my knowledge, only make install requires root privileges. In any cases, this should be documented somewhere. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 |
|
From: Peter C. <cz...@ba...> - 2011-02-18 10:16:52
|
Hello, On 02/17/2011 09:17 AM, Peter Czanik wrote: > - test it with syslog-ng on local and network connections, using default > and non default port numbers > And that's right. With MySQL, if I don't configure a port number in syslog-ng.conf, then the default 3306 is used. Setting the port number to another value also works fine. With PostgreSQL if the port is not specified, libdbi tries to connect to port 0 (zero). It works fine, once a port is specified. I was told, that in syslog-ng all databases are treated equal, so it's something in libdbi port handling. -- Peter Czanik (CzP) <cz...@ba...> BalaBit IT Security / syslog-ng upstream http://czanik.blogs.balabit.com/ |
|
From: Markus H. <mar...@mh...> - 2011-02-18 11:41:41
|
Hi Peter, Peter Czanik <cz...@ba...> was heard to say: > With PostgreSQL if the port is not specified, libdbi tries to connect to > port 0 (zero). It works fine, once a port is specified. > I was told, that in syslog-ng all databases are treated equal, so it's > something in libdbi port handling. Not necessarily. libdbi should not fiddle with port settings at all. The drivers do not supply any default setting either if the calling application does not explicitly set the port. It might actually be a matter of how the client libraries deal with a missing port. I didn't check the docs, but MySQL, being a bit more relaxed, may very well use a compile-time default in this case, whereas the PostgreSQL lib might rather act according to "garbage in, garbage out". In order to make the drivers more consistent, we might of course supply a default port for those drivers that would otherwise fail. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 |
|
From: <mar...@mh...> - 2011-02-19 13:08:48
|
Peter Czanik writes: > And that's right. With MySQL, if I don't configure a port number in > syslog-ng.conf, then the default 3306 is used. Setting the port number > to another value also works fine. > With PostgreSQL if the port is not specified, libdbi tries to connect to > port 0 (zero). It works fine, once a port is specified. > I was told, that in syslog-ng all databases are treated equal, so it's > something in libdbi port handling. I had to revisit this issue in a different context (libdbi-drivers Bug #3163428). Now pgsql and mysql are supposed to deal with ports the same way. If a string option is used to set the port, this port is used. If no string option is set, but a numeric option is set, use that. If neither is set, the port will be set to zero. This essentially means that applications using libdbi are expected to provide an appropriate port. There is nothing going to happen automagically. If this behaviour is not desired, feel free to request a change. As mentioned previously, we could provide the well-known defaults of pgsql and mysql instead of zero. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 |
|
From: Peter C. <cz...@ba...> - 2011-03-02 08:08:06
|
Hello, On 02/19/2011 02:10 PM, mar...@mh... wrote: > I had to revisit this issue in a different context (libdbi-drivers Bug > #3163428). Now pgsql and mysql are supposed to deal with ports the > same way. If a string option is used to set the port, this port is > used. If no string option is set, but a numeric option is set, use > that. If neither is set, the port will be set to zero. This > essentially means that applications using libdbi are expected to > provide an appropriate port. There is nothing going to happen > automagically. If this behaviour is not desired, feel free to request > a change. As mentioned previously, we could provide the well-known > defaults of pgsql and mysql instead of zero. > > One of the main values of libdbi that it hides driver specific details from applications. So I was told by colleagues, that having default port numbers in libdbi would be very welcome. Bye, -- Peter Czanik (CzP) <cz...@ba...> BalaBit IT Security / syslog-ng upstream http://czanik.blogs.balabit.com/ |
|
From: <mar...@mh...> - 2011-03-02 21:15:46
|
Peter Czanik writes: > One of the main values of libdbi that it hides driver specific details > from applications. So I was told by colleagues, that having default port > numbers in libdbi would be very welcome. > Bye, > Hi, thanks for the feedback. I've changed both the mysql and the pgsql driver to fill in the default ports if none was specified. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 |