Giter VIP home page Giter VIP logo

Comments (7)

a-martynovich avatar a-martynovich commented on June 5, 2024

@vpetersson AFAIK the only case when the device is already claimed is if it had the agent already installed (and its config files and certs therein).

Am I missing something and do we need to ask the server if the device had already been claimed?

from agent.

vpetersson avatar vpetersson commented on June 5, 2024

What I'm talking about is if you run apt-get upgrade and install an updated version of the agent. We then get the same message again about how to claim the device (despite that it has already been claimed)

Am I missing something and do we need to ask the server if the device had already been claimed?

Yes, I think that's the only way.

from agent.

a-martynovich avatar a-martynovich commented on June 5, 2024

clarification:

  • When wott-agent claim-url is called, check if the device is already claimed by getting /api/.../is-claimed (WoTTsecurity/api#206) and if it is, return empty string.
  • Update postinst, do nothing if claim-url returned empty string.

@vpetersson do we need the postinst message at all when upgrading? It's all about getting started and claiming: https://github.com/WoTTsecurity/agent/blob/master/debian/postinst#L4-L13

from agent.

vpetersson avatar vpetersson commented on June 5, 2024

We probably do not need it at all, to be honest. We do however need to know the claim status in the agent.

from agent.

a-martynovich avatar a-martynovich commented on June 5, 2024

@vpetersson So the postinst message should be completely removed, right?

We do however need to know the claim status in the agent.

My idea is that if the device is already claimed wott-agent claim-url returns empty. The url isn't valid anyway in this case.

from agent.

vpetersson avatar vpetersson commented on June 5, 2024

Yeah sure, or an error saying 'Device already claimed' or similar.

from agent.

eugenosm avatar eugenosm commented on June 5, 2024

i'll take it

from agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.