Feature #2975

Phone home

Added by Giacomo Sanchietti over 6 years ago. Updated over 6 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-phonehome
Target version:v6.6-beta1
Resolution: NEEDINFO:No

Description

The phone home is a simple software witch contacts a remote server and send anonymous statics.

Features:
  • send data using HTTP
  • send yum uuid (/var/lib/yum/uuid) and system release (config getprop sysconfig Version)
  • supports manual and authenticated proxy
  • data should be sent once a week
  • disabled by default

Related issues

Related to NethServer 6 - Feature #2957: Base: first configuration wizard CLOSED

Associated revisions

Revision 92482dfb
Added by Giacomo Sanchietti over 6 years ago

Refactor git repository for rpm package. Refs #2975

Revision 94fef938
Added by Giacomo Sanchietti over 6 years ago

spec: mark configuration file. Refs #2975

Revision db83b939
Added by Giacomo Sanchietti over 6 years ago

client script: silence curl. Refs #2975

Revision 81471b7c
Added by Giacomo Sanchietti over 6 years ago

client script: do not execute when disabled. Refs #2975

Revision e944d625
Added by Giacomo Sanchietti over 6 years ago

Add nethserver-phonehome package to nethserver-iso group. Refs #2975

History

#1 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20

#2 Updated by Giacomo Sanchietti over 6 years ago

  • Category set to nethserver-phonehome

#3 Updated by Giacomo Sanchietti over 6 years ago

  • Related to Feature #2957: Base: first configuration wizard added

#4 Updated by Edoardo Spadoni over 6 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Edoardo Spadoni
  • % Done changed from 20 to 30

#5 Updated by Edoardo Spadoni over 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee changed from Edoardo Spadoni to Giacomo Sanchietti
  • % Done changed from 30 to 60

#6 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Package in nethserver-testing:
  • nethserver-phonehome-0.0.2-6.0git46948486.ns6.noarch.rpm

#7 Updated by Edoardo Spadoni over 6 years ago

Test Case 1
The status of phone-home service is disabled by default.
  • Set the SERVER_IP value in /etc/sysconfig/phone-home
  • Run the script phone-home in cron.weekly, the script should finish without error and without send any data.
Test Case 2
Enable the status of phone-home service by running:
config set phone-home configuration status enabled
  • Set the SERVER_IP value in /etc/sysconfig/phone-home
  • Run the script phone-home in cron.weekly, the script should send UUID and RELEASE data to server's API.
Test Case 3
Enable the status of phone-home service by running:
config set phone-home configuration status enabled
  • Set the SERVER_IP value in /etc/sysconfig/phone-home
  • Set the PROXY_SERVER and PROXY_PORT values in config.php (manual)
  • Run the script phone-home in cron.weekly, the script should send UUID and RELEASE data to server's API through the proxy.
Test Case 4
Enable the status of phone-home service by running:
config set phone-home configuration status enabled
  • Set the SERVER_IP value in /etc/sysconfig/phone-home
  • Set the PROXY_SERVER, PROXY_PORT, PROXY_USER, PROXY_PASS values in config.php (authenticated)
  • Run the script phone-home in cron.weekly, the script should send UUID and RELEASE data to server's API through the proxy.

#8 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from ON_QA to TRIAGED
  • % Done changed from 70 to 20
Test case 1: FAILED
  • After installation, SERVER_IP is already set to www.nethserver.org
  • Status is disabled, but the script is executed anyway:
    [root@localhost ~]# config setprop phone-home status disabled
    [root@localhost ~]# /etc/cron.weekly/phone-home
    [root@localhost ~]# sh -x /etc/cron.weekly/phone-home
    + . /etc/sysconfig/phone-home
    ++ SERVER_IP=www.nethserver.org
    ++ PROXY_SERVER=
    ++ PROXY_USER=
    ++ PROXY_PASS=
    ++ PROXY_PORT=
    ++ /sbin/e-smith/config get phone-home status
    + STATUS='configuration|status|disabled'
    + '[' 'configuration|status|disabled' == disabled ']'
    + '[' x '!=' x ']'
    + PROXY_OPTIONS_SERVER=
    + '[' x '!=' x ']'
    + PROXY_OPTIONS_SERVER=
    + '[' x '!=' x ']'
    + PROXY_OPTIONS_USER=
    + '[' x '!=' x ']'
    + PROXY_OPTIONS_USER=
    + PROXY_OPTIONS=' '
    ++ /bin/cat /var/lib/yum/uuid
    + UUID=17b204de-ec5c-4592-9fd4-0b818fed8efb
    ++ /sbin/e-smith/config getprop sysconfig Version
    + RELEASE=6.5
    + curl -s -X POST --data 'method=add_info&uuid=17b204de-ec5c-4592-9fd4-0b818fed8efb&release=6.5' http://www.nethserver.org/phone-home/index.php
    

Test case 2: OK
Test case 3: OK
Test case 4: OK

Proxy configuration has been verified analyzing logs from the proxy server itself.

#9 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#10 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

#11 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Package in nethserver-testing:
  • nethserver-phonehome-0.0.2-7.0git81471b7c.ns6.noarch.rpm

#12 Updated by Edoardo Spadoni over 6 years ago

  • Status changed from ON_QA to VERIFIED
  • % Done changed from 70 to 90
Test Case 1: OK
  • Check both enabled and disabled status.

Test Case 2: OK
Test Case 3: OK
Test Case 4: OK

#13 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Released in 6.5/nethserver-updates and 6.6/nethserver-base:
  • nethserver-phonehome-1.0.0-1.ns6.noarch.rpm
Docs:

Also available in: Atom PDF