GNU bug report logs - #33549
[PATCH 0/6] Add Zabbix services.

Previous Next

Package: guix-patches;

Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>

Date: Thu, 29 Nov 2018 18:48:02 UTC

Severity: normal

Tags: patch

Done: Oleg Pykhalov <go.wigust <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #37 received at 33549-done <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 33549-done <at> debbugs.gnu.org
Subject: Re: [bug#33549] [PATCH 6/6] services: monitoring: Add
 'zabbix-front-end'.
Date: Wed, 19 Dec 2018 21:27:28 +0300
[Message part 1 (text/plain, inline)]
Hi Ludovic,

Thank you for review.

Ludovic Courtès <ludo <at> gnu.org> writes:

[…]

>> +$DB['PASSWORD'] = '" (if (string-null? db-password)
>> +                         (if (string-null? db-secret-file)
>> +                             (display "Provide a `db-secret-file' \
>> +or `db-password' field.
>> +"
>> +                                      (current-error-port))
>> +                             (string-trim-both
>> +                              (with-input-from-file db-secret-file
>> +                                read-string)))
>> +                         (begin
>> +                           (display "
>> +Hint: Consider use `db-secret-file' instead of `db-password' and unset
>> +`db-password' in `zabbix-front-end-configuration' for security.
>> +")
>> +                           db-password)) "';
>> +
>> +// Schema name. Used for IBM DB2 and PostgreSQL.
>> +$DB['SCHEMA'] = '';
>> +
>> +$ZBX_SERVER      = '" zabbix-host "';
>> +$ZBX_SERVER_PORT = '" (number->string zabbix-port) "';
>> +$ZBX_SERVER_NAME = '';
>> +
>> +$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
>> +"))))
>
> I saw these “hints” in the build log of Cuirass and that got me curious.
> :-)

Do you mean “hints” during ‘zabbix’ tests?

> A couple of comments…  For consistency, hints should be reported using
> the ‘display-hint’ procedure, which takes a Texinfo string as input.
>
> Second, while the second ‘display’ call does look like a hint, the first
> one looks like it should be an error, shouldn’t it?  In that case, I’d
> suggest something like:
>
>   (raise (condition
>            (&message
>             (message "You must provide either 'db-secret-file' or 'db-password'."))))

Thanks, pushed as 0485717ee94e7f161d072f017edce5d35df49c81 to master.

> Third, it would be nice to report source location info along with hints
> and errors.  To do that, you could add an innate ‘location’ field to
> <zabbix-front-end-configuration> as done for <package>.  Then, along
> with the &message condition above, you could raise an &error-location as
> is done in a few places.
>
> Does that make sense?

Sure.  I see innate location field in <package>, but unfortunately I'm
not sure how to implement it, because we use define-configuration for
<zabbix-front-end-configuration>.  So the implementation of that feature
may take a time.  ;-)

> Anyway thanks for this patch series, we’ll probably put it to good use
> on the build farm!

Feel free to ping me.


Oleg.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 6 years and 160 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.