Search Engine: Elastic

Article ID: 132313, created on Mar 2, 2018, last review on Jul 14, 2018

  • Applies to:
  • Operations Automation 7.3


After Azure CSP APS application upgrade to version 5.1, detailed usage reports for the month that includes the upgrade date contain duplicate resources, i.e. the same VM name is listed twice with different usage and cost.

Example of such reports in Azure CSP database:

azurecsp=# select id,start_time,last_update_time from oss_reports where oss_id = 'ae840347-58fd-4358-9ca7-676f01b4334b' order by id asc;
 id  |       start_time       |    last_update_time
  46 | 2017-12-22 00:00:00+02 | 2018-01-21 16:00:00+02
  79 | 2018-01-22 00:00:00+02 | 2018-02-17 20:00:00+02 <--- period froze before the upgrade
 125 | 2018-01-22 02:00:00+02 | 2018-02-21 21:00:00+02 <--- same period continued after the upgrade
 153 | 2018-02-22 02:00:00+02 | 2018-02-26 20:00:00+02

The system local time differes from the time zone set in Java environment. System local time:

[root@azcspaeh02 ~]# date +'%Z %z'
EET +0200

The default time in Wildfly is UTC:

[root@azcspaeh02 ~]# grep user.timezone /usr/local/azure/wildfly-10.1.0.Final/standalone/log/server.log
        user.timezone = UTC


The cause of this post-upgrade effect is the difference between the system local time and the default time zone in Java on the Azure CSP Endpoint.


  1. Make sure that the time zone is set correctly on the OS level:

    • check /etc/localtime is linke to proper time zone:

      [root@azureaeh ~]# ls -alh /etc/localtime
      lrwxrwxrwx 1 root root 42 Mar  9 11:56 /etc/localtime -> /usr/share/zoneinfo/Europe/Madrid
    • check that tzdata RPM is of the latest version and update it otherwise:

      # yum update tzdata
    • make sure that NTP service is configured correctly on Azure Endpoint (or on the Virtuozzo hardware node, if Endpoint is located inside a VZ container)
  2. Once the time is fixed, download the fix_duplicate_reports.sql SQL script into /var/lib/pgsql directory and apply it:

    # chown postgres:postgres /var/lib/pgsql/fix_duplicate_reports.sql
    # sudo -u postgres psql -d azurecsp -f fix_duplicate_reports.sql

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 dd79f16c76b9dca75205ab5e9f5465ea 1941880841f714e458ae4dc3d9f3062d

Email subscription for changes to this article
Save as PDF