On 16 April 2018 at 10:26, Conrad Djedjebi <conrad.djedjebi@linaro.org> wrote:
Hi Neil,

Thank you for your answer,

I tryed to run the mail command after making a connection to the server this way :

    connection = xmlrpclib.ServerProxy("http://%s:%s@%s/RPC2" % (USER, TOKEN, HOSTNAME))
    connection.mail("conrad@localhost", "conrad.djedjebi@gmail.com", msg)

Method mail is not found.

I guess you suggested to use the command mail email@address.com in a different way. Once I am logged to the server using the following command   << connection = xmlrpclib.ServerProxy("http://%s:%s@%s/RPC2" % (USER, TOKEN, HOSTNAME))  >>, how can I use the mail command?

You need a shell on the master. 

The XMLRPC server proxy is not the same as "logging in" - you must have console or SSH login access. You will also need sudo or root access on the master to be able to fix anything.

You're specifying localhost in that example, so you run mail in a terminal on the machine. You will need to read up on how to send email from the command line on your machine. That cannot be covered in the LAVA documentation or this mailing list. Whatever you have configured to send mail via a web browser or GUI client is irrelevant - you must be able to send email to remote email accounts directly from the command line on localhost.
 


regards,

On 16 April 2018 at 07:49, Neil Williams <neil.williams@linaro.org> wrote:
On 15 April 2018 at 23:11, Conrad Djedjebi <conrad.djedjebi@linaro.org> wrote:
Hi everyone,

I am writing this email in order to have your opinion on the following :

I am trying to use LAVA Notifications in my LAVA instance. I used the following template in one of my LAVA Test Job Definition files :

notify:
  recipients:
  - to:
     method: email
     email: conrad.djedjebi@linaro.org
  criteria:
    status: complete
  verbosity: verbose
  compare:
    query:
      name: OPTEE_xtest_Jobs
      username: admin
In that template, OPTEE_xtest_Jobs is the name of a query (testjob query) and admin is the user who owns that query. The query is listing all the completed jobs of that kind (I mean that the job I am currently running will be listed in the query OPTEE_xtest_Jobs). 

But each time my LAVA job is completed, I am not getting any email notification.

Login to the master using SSH or similar. Try to send email to the configured email address using the `mail` command: mail email@address.com 
Check for errors by running mail without arguments to see if you have a failed delivery message.
Configure your MTA on the master to make sure it can send email from the command line.
 

In my user profil (my user name is conrad in the instance of LAVA I am working on), I already provided an email. So even if I used the following template, I should have get an email notification :

notify:
  recipients:
  - to:
     method: email
     user: conrad
  criteria:
    status: complete
  verbosity: verbose
  compare:
    query:
      name: OPTEE_xtest_Jobs
      username: admin


Is there a point I missed? If anyone has some advices to give me in order to get the notifications work, I would appreciate.


regards,

_______________________________________________
Lava-users mailing list
Lava-users@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lava-users




--




--