Re: [PATCH 1/3] BUILD: illumos: pthread_getcpuclockid is not available

2024-05-04 Thread Илья Шипицин
вс, 5 мая 2024 г. в 02:05, Miroslav Zagorac :

> On 04. 05. 2024. 17:36, Ilya Shipitsin wrote:
> > this function is considered optional for POSIX and not implemented
> > on Illumos
> >
> > Reference:
> https://www.gnu.org/software/gnulib/manual/html_node/pthread_005fgetcpuclockid.html
> > According to
> https://github.com/cpredef/predef/blob/master/OperatingSystems.md Illumos
> > is identified by __illumos__ macro available since gcc-11
> > ---
> >  src/clock.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/clock.c b/src/clock.c
> > index ec2133c8b..f484c2d9c 100644
> > --- a/src/clock.c
> > +++ b/src/clock.c
> > @@ -135,7 +135,7 @@ uint64_t now_cpu_time_thread(int thr)
> >  /* set the clock source for the local thread */
> >  void clock_set_local_source(void)
> >  {
> > -#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) &&
> defined(_POSIX_THREAD_CPUTIME)
> > +#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) &&
> defined(_POSIX_THREAD_CPUTIME) && !defined(__illumos__)
> >  #ifdef USE_THREAD
> >   pthread_getcpuclockid(pthread_self(), _thread_clock_id[tid]);
> >  #else
>
> Hello Ilya,
>
> I think that this patch is not satisfactory because, for example, Solaris
> 11.4.0.0.1.15.0 (from 2018) has _POSIX_TIMERS and _POSIX_THREAD_CPUTIME
> defined, but does not have the pthread_getcpuclockid() function; while
> solaris
> 11.4.42.0.0.111.0 (from 2022) has that function.
>

I'm trying to build on this vmactions/solaris-vm: Use Solaris in github
actions 
it does not have pthread_getcpuclockid()



>
> Maybe it could be solved in a different way..
>
>
> Best regards,
>
> --
> Miroslav Zagorac
>
> What can change the nature of a man?
>


Re: [PATCH 1/3] BUILD: illumos: pthread_getcpuclockid is not available

2024-05-04 Thread Miroslav Zagorac
On 04. 05. 2024. 17:36, Ilya Shipitsin wrote:
> this function is considered optional for POSIX and not implemented
> on Illumos
> 
> Reference: 
> https://www.gnu.org/software/gnulib/manual/html_node/pthread_005fgetcpuclockid.html
> According to 
> https://github.com/cpredef/predef/blob/master/OperatingSystems.md Illumos
> is identified by __illumos__ macro available since gcc-11
> ---
>  src/clock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/clock.c b/src/clock.c
> index ec2133c8b..f484c2d9c 100644
> --- a/src/clock.c
> +++ b/src/clock.c
> @@ -135,7 +135,7 @@ uint64_t now_cpu_time_thread(int thr)
>  /* set the clock source for the local thread */
>  void clock_set_local_source(void)
>  {
> -#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) && 
> defined(_POSIX_THREAD_CPUTIME)
> +#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) && 
> defined(_POSIX_THREAD_CPUTIME) && !defined(__illumos__)
>  #ifdef USE_THREAD
>   pthread_getcpuclockid(pthread_self(), _thread_clock_id[tid]);
>  #else

Hello Ilya,

I think that this patch is not satisfactory because, for example, Solaris
11.4.0.0.1.15.0 (from 2018) has _POSIX_TIMERS and _POSIX_THREAD_CPUTIME
defined, but does not have the pthread_getcpuclockid() function; while solaris
11.4.42.0.0.111.0 (from 2022) has that function.

Maybe it could be solved in a different way..


Best regards,

-- 
Miroslav Zagorac

What can change the nature of a man?



[PATCH 2/3] CI: add Illumos scheduled workflow

2024-05-04 Thread Ilya Shipitsin
this is very initial implementation. I was not able to install gcc-11,
thus I mimic it's define
---
 .github/workflows/illumos.yml | 24 
 1 file changed, 24 insertions(+)
 create mode 100644 .github/workflows/illumos.yml

diff --git a/.github/workflows/illumos.yml b/.github/workflows/illumos.yml
new file mode 100644
index 0..8990feda2
--- /dev/null
+++ b/.github/workflows/illumos.yml
@@ -0,0 +1,24 @@
+name: Illumos
+
+on:
+  schedule:
+- cron: "0 0 25 * *"
+
+jobs:
+  gcc:
+runs-on: ubuntu-latest
+if: ${{ github.repository_owner == 'haproxy' }}
+permissions:
+  contents: read
+steps:
+  - name: "Checkout repository"
+uses: actions/checkout@v4
+
+  - name: "Build on VM"
+uses: vmactions/solaris-vm@v1
+with:
+  prepare: |
+pkg install  gcc make
+  run: |
+gmake DEFINE="-D__illumos__" CC=gcc TARGET=solaris USE_OPENSSL=1 
USE_PROMEX=1
+
-- 
2.45.0




[PATCH 3/3] CI: netbsd: limit scheduled workflow to parent repo only

2024-05-04 Thread Ilya Shipitsin
it is not very useful for most of forks.
---
 .github/workflows/netbsd.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/netbsd.yml b/.github/workflows/netbsd.yml
index ea0345954..6514725e1 100644
--- a/.github/workflows/netbsd.yml
+++ b/.github/workflows/netbsd.yml
@@ -7,6 +7,7 @@ on:
 jobs:
   gcc:
 runs-on: ubuntu-latest
+if: ${{ github.repository_owner == 'haproxy' }}
 permissions:
   contents: read
 steps:
-- 
2.45.0




[PATCH 0/3] initial Illumos CI, netbsd CI cleanup

2024-05-04 Thread Ilya Shipitsin
very initial Illumos CI

Ilya Shipitsin (3):
  BUILD: illumos: pthread_getcpuclockid is not available
  CI: add Illumos scheduled workflow
  CI: netbsd: limit scheduled workflow to parent repo only

 .github/workflows/illumos.yml | 24 
 .github/workflows/netbsd.yml  |  1 +
 src/clock.c   |  2 +-
 3 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 .github/workflows/illumos.yml

-- 
2.45.0




[PATCH 1/3] BUILD: illumos: pthread_getcpuclockid is not available

2024-05-04 Thread Ilya Shipitsin
this function is considered optional for POSIX and not implemented
on Illumos

Reference: 
https://www.gnu.org/software/gnulib/manual/html_node/pthread_005fgetcpuclockid.html
According to https://github.com/cpredef/predef/blob/master/OperatingSystems.md 
Illumos
is identified by __illumos__ macro available since gcc-11
---
 src/clock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/clock.c b/src/clock.c
index ec2133c8b..f484c2d9c 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -135,7 +135,7 @@ uint64_t now_cpu_time_thread(int thr)
 /* set the clock source for the local thread */
 void clock_set_local_source(void)
 {
-#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) && 
defined(_POSIX_THREAD_CPUTIME)
+#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) && 
defined(_POSIX_THREAD_CPUTIME) && !defined(__illumos__)
 #ifdef USE_THREAD
pthread_getcpuclockid(pthread_self(), _thread_clock_id[tid]);
 #else
-- 
2.45.0




[ANNOUNCE] haproxy-3.0-dev10

2024-05-04 Thread Willy Tarreau
Hi,

HAProxy 3.0-dev10 was released on 2024/05/04. It added 47 new commits
after version 3.0-dev9.

This week was short, with days off explaining the reduced number of commits,
but there are still interesting ones that made it worth producing another
release.

Last week's log updates caused a few small regressions in the log format
production (e.g. when dealing with empty fields surrounded by spaces), and
these are now fixed here. That just reminds us that the expectations between
logs and other uses of log formats is probably starting to diverge quite a
bit, between logs, headers, health checks, http-return, error files etc,
and that probably at some point we should start to think about specifying
variations depending on the use case, or maybe even think about performing
some unifying changes that could cause tiny differences that might require
some to slightly adjust their log formats. The offender here is the %hr log
format which can be empty and cause the following space to be dropped, or
non-empty and respect the space. That doesn't fit well with the principle
of concatenating fields as they are, e.g. when building a header, check or
body. That's just some food for later anyway. Oh, and speaking about logs,
the tiny performance drop I spoke about last week was now recovered.

Another point is that historically, "bind" and "server" lines would silently
ignore the "namespace" argument for UNIX sockets, just because code paths
were different, UNIX sockets had their own socket() call, and when namespaces
were introduced, UNIX sockets simply did not support them. But this changed
long ago and it could be surprising for someone genuinely configuring that
to see the namespace being ignored. Now the code paths were refactored so
that the same code is used to create all sockets and UNIX sockets can now
naturally make use of namespaces when configured. Another point regarding
namespaces is that it's one of the cases where capabilitiy cap_sys_admin is
required but it wasn't reported then. Now this is properly checked for, it
is reported if missing, and a new "cap_sys_admin" capability was added to
enable them without running as root. Finally, when the capability is missing,
instead of saying "failed to create socket", the error will explicitly state
the permission issue when facing EPERM; this should help users spot where the
problem is.

The HTTP client now has an option to use either origin or absolute URIs.
This should make it easier to configure to talk to old servers which are
not spec-compliant and do not support absolute URIs. This is being used
now by the ocsp_update agent via a new setting "ocsp-update.httpproxy".

Concerning the reloadable stats counters, the support for the rate counters
and the age types were added. For example a server's last state change should
now be transferred correctly.

The rest is some cleanups, spelling fixes in doc and code, CI updates
(test on NetBSD 10), and a few more reg tests (including one for the
recently fixed Vary header processing).

Last week I mentioned my intent to try to fix the buffer_wait infrastructure
that deals with low-memory condition. I thought I had something really about
to work until I noticed a bug which, once fixed, got me back to the original
situation. Maybe it's just a matter of re-studying the situation and it could
now be quick, or it's more subtle. So in any case for now I'm not merging
anything until I understand the root cause of all this. I haven't completely
lost hope yet ;-)  It's just that it takes time away from a lot of other
things...

Please find the usual URLs below :
   Site index   : https://www.haproxy.org/
   Documentation: https://docs.haproxy.org/
   Wiki : https://github.com/haproxy/wiki/wiki
   Discourse: https://discourse.haproxy.org/
   Slack channel: https://slack.haproxy.org/
   Issue tracker: https://github.com/haproxy/haproxy/issues
   Sources  : https://www.haproxy.org/download/3.0/src/
   Git repository   : https://git.haproxy.org/git/haproxy.git/
   Git Web browsing : https://git.haproxy.org/?p=haproxy.git
   Changelog: https://www.haproxy.org/download/3.0/src/CHANGELOG
   Dataplane API: 
https://github.com/haproxytech/dataplaneapi/releases/latest
   Pending bugs : https://www.haproxy.org/l/pending-bugs
   Reviewed bugs: https://www.haproxy.org/l/reviewed-bugs
   Code reports : https://www.haproxy.org/l/code-reports
   Latest builds: https://www.haproxy.org/l/dev-packages

Willy
---
Complete changelog :
Amaury Denoyelle (14):
  BUG/MINOR: stats: replace objt_* by __objt_* macros
  MINOR: stats: fix visual alignment for stat_cols_px definition
  MINOR: stats: convert req_tot as generic column
  MINOR: stats: prepare stats-file support for values other than FN_COUNTER
  MINOR: counters: move freq-ctr from proxy/server into counters struct
  MINOR: stats: support rate in stats-file
  MINOR: stats: convert rate as