Wednesday, March 8, 2017

Who pays for a ticket?

Gerd asked me:

Vielleicht gibst du uns kurz eine Rückmeldung zum Aufwand und der zeitlichen Umsetzung? Wir haben nächsten Montag ein Treffen, wo wir das besprechen.

A seemingly simple question, but it triggered another avalanche of ideas about how to write service reports.

I opened #1559 (Who pays for a ticket?). The idea is:

  • a new choicelist lino_noi.lib.clocking.ReportingTypes with three choices “Worker”, “Employer” and “Customer”. “Worker” is for volunteer work where the worker does not get paid. “Employer” is when working time is paid to the worker by the employer (but no customer is going to pay for it directly). “Customer” is when working time should be paid directly by the customer.
  • a new field reporting_type per project pointing to that choicelist.
  • The WorkedHours report now ventilates using this list (and no longer by top-level project)

Side effects:

  • I moved the technical description of a ticket from the docstring to the technical specs (Ticket management in Lino Noi) and discovered a new promising convention : we merge everything below the plugin level (models, tables, actions, roles, …) into this single document.

A strange phenomen under Apache

I registered #1560, a problem which occurs once per client after a server restart. The user sees a 500 error message, but there is nothing logged.

The apache error log has these messages which might be related:

[Wed Mar 08 09:32:10.256028 2017] [wsgi:error] [pid 25370:tid 139929323210496] No handlers could be found for logger "django.request"
[Wed Mar 08 09:32:11.361471 2017] [wsgi:error] [pid 25370:tid 139929323210496] WARNING: There are known rendering problems with Cairo <= 1.14.0
[Wed Mar 08 09:32:11.361811 2017] [wsgi:error] [pid 25370:tid 139929323210496] WARNING: @font-face support needs Pango >= 1.38
[Wed Mar 08 09:32:11.427129 2017] [wsgi:error] [pid 25370:tid 139929323210496] Started mod_wsgi (using prod_sites.vilma.settings) --> PID 25370
[Wed Mar 08 09:32:12.383068 2017] [wsgi:error] [pid 25370:tid 139929323210496] .../vilma/env/local/lib/python2.7/site-packages/cffi/ UserWarning: 'point_conversion_form_t' has no values explicitly defined; guessing that it is equivalent to 'unsigned int'
[Wed Mar 08 09:32:12.383101 2017] [wsgi:error] [pid 25370:tid 139929323210496]   % self._get_c_name())
[Wed Mar 08 09:32:12.383103 2017] [wsgi:error] [pid 25370:tid 139929323210496]

I disabled one of them by adding the following to their

import warnings
warnings.filterwarnings("ignore", module='cffi.model')

I tried to get rid of No handlers could be found for logger "django.request" by changing the value of auto_configure_logger_names. Without success.

Deploy to Jane

Together with Tonis we upgraded Jane. Some experiments with replying to comments and the new lino.modlib.inbox plugin.

Mailman not working on

When I post to a mailing list on SR, then we see the following /var/log/mail.log:

Mar  8 10:57:54 ovh2 postfix/smtpd[1991]: 468504558F:[]
Mar  8 10:57:54 ovh2 postfix/cleanup[1995]: 468504558F: message-id=<>
Mar  8 10:57:54 ovh2 postfix/qmgr[18255]: 468504558F: from=<>, size=2096, nrcpt=1 (queue active)
Mar  8 10:57:54 ovh2 postfix/smtpd[1991]: disconnect from[]
Mar  8 10:57:54 ovh2 postfix/pipe[1998]: 468504558F: to=<>, relay=spamassassin, delay=0.36, delays=0.07/0.0
1/0/0.28, dsn=2.0.0, status=sent (delivered via spamassassin service)
Mar  8 10:57:54 ovh2 postfix/qmgr[18255]: 468504558F: removed
Mar  8 10:57:54 ovh2 postfix/pickup[30609]: 9B5FD45591: uid=1005 from=<>
Mar  8 10:57:54 ovh2 postfix/cleanup[1995]: 9B5FD45591: message-id=<>
Mar  8 10:57:54 ovh2 postfix/qmgr[18255]: 9B5FD45591: from=<>, size=2439, nrcpt=1 (queue active)
Mar  8 10:57:54 ovh2 postfix/local[2003]: 9B5FD45591: to=<>, relay=local, delay=0.14, delays=0.02/0.01/0/0.
11, dsn=2.0.0, status=sent (delivered to command: /var/lib/mailman/mail/mailman post test)
Mar  8 10:57:54 ovh2 postfix/qmgr[18255]: 9B5FD45591: removed

Everything looks normal. Postfix hands the mail over to Mailman and then removes it from the queue. The problem is that Mailman does not seem to receive anything. No error message.

Logging server restarts

Monique reported #1562. I am not sure, maybe I did a graceful apache restart at that time. I installed the Logging all bash commands to syslog also on because it is handy for explaining such problems.