personium / personium-core

Core module of Personium
https://personium.io
Apache License 2.0
88 stars 16 forks source link

UnitManager cannot display cells with personium-core v1.7.18b. #482

Closed tochi-y closed 5 years ago

tochi-y commented 5 years ago

After deploying a personium unit v1.7.18b using ansible playbook, UnitManager cannot display cells.

app-uc-unit-manager stg-demo personium io____html_environment html_lng=en(Laptop with HiDPI screen)

But the same personium unit replaced with v1.7.17, the unitadmin cell is normally displayed with the UnitManager. Is this a personium-core v1.7.18b bug? And is this related with #479?

There are differences between v1.7.17 and v1.7.18b in calling APIs as followings.

v.1.7.17

GET https://personium.example/__ctl/Cell?$top=500&$orderby=__updated%20desc

{
  "d": {
    "results": [
      {
        "__metadata": {
          "uri": "https://personium.example/__ctl/Cell(unitadmin)",
          "etag": "W/\"1-1568187671899\"",
          "type": "UnitCtl.Cell"
        },
        "Name": "unitadmin",
        "__published": "/Date(1568187671899)/",
        "__updated": "/Date(1568187671899)/"
      }
    ]
  }
}

GET https://personium.example/__ctl/Cell?$top=0&$inlinecount=allpages

{"d":{"results":[],"__count":"1"}}

v.1.7.18

GET https://personium.example/__ctl/Cell?$top=500&$orderby=__updated%20desc

{"d":{"results":[]}}

GET https://personium.example/__ctl/Cell?$top=0&$inlinecount=allpages

{"d":{"results":[],"__count":"0"}}
tochi-y commented 5 years ago

Elastic search data:

{
  "_index": "u0_ad.cell",
  "_type": "_doc",
  "_id": "O9q7ILXOSAWDSjl-WSr4Gg",
  "_version": 1,
  "_score": 1,
  "_routing": "pcsCell",
  "_source": {
    "p": 1568187671899,
    "a": {},
    "b": null,
    "s": {
      "Name": "unitadmin"
    },
    "c": null,
    "t": null,
    "d": {},
    "u": 1568187671899,
    "h": {
      "Owner": "personium-localunit:/unitadmin/#unitadmin"
    },
    "l": {},
    "n": null,
    "type": "Cell"
  }
}
tochi-y commented 5 years ago

Data in the elasticsearch are different between unitadmin and the cell created by UnitManager.

1 7 18b

In v1.7.18, the Owner data should be stored as personium-localunit:{cellname}/. But the shellscript called from the ansible playbook gives a parameter as personium-localunit:/{cellname}.

https://github.com/personium/ansible/blob/460d78c2bb88b6a074310d211f5e796c17f1fc72/3-server_unit/resource/bastion/tmp/personium-init-svcmgr.sh.j2#L27

So it is not a personium-core problem. The shellscript should be fixed.

tochi-y commented 5 years ago

I closed this issue and created the following issue. https://github.com/personium/ansible/issues/109