balena-io / balena-cli

The official balena CLI tool.
Apache License 2.0
453 stars 139 forks source link

command `balena fleet restart <fleet>` gives error `BalenaApplicationNotFound` #2468

Closed saveriogzz closed 2 years ago

saveriogzz commented 2 years ago

Setup

Expected Behavior

When I run the command balena fleet restart <fleet> I expect all the devices of my fleet to reboot.

Actual Behavior

When running the aforementioned command, I get the error

BalenaApplicationNotFound: Application not found: 7

This happens both when specifying the fleet with its slug as well as solely the fleet's name.

toochevere commented 2 years ago

Hello @saveriogzz. What environment are you targeting? Balena cloud or open balena? What are the results of running balena whoami? I am able to successfully reboot my fleet using balena fleet restart.

saveriogzz commented 2 years ago

hey @toochevere , the balena whoami command gives me back USERNAME: admin. I'm targeting an openBalena environment.

toochevere commented 2 years ago

Can you paste the result of the following commands?
balena fleets balena fleet <fleet>

If you find that balena fleet <fleets> in fact works (gives you fleet info) then try the following: 1) Create a new test user 2) Create a fleet for that test user 3) Do balena login with the test user's credentials 4) Try balena fleet restart <fleet and post the result.

saveriogzz commented 2 years ago

Unfortunately, openBalena is single user and I'm not able to create a new user!

toochevere commented 2 years ago

Ok, the problem is that fleet restart is not a function that exists on openBalena. It only exists currently on Balena Cloud.

This is extremely not clear, as evidenced by the fact that I was also not aware of this either. I am surfacing at a weekly product call internally a topic of how we can be more clear about what CLI functions are available on openBalena and which ones are not. In the meantime, however, you can open an issue on the openBalena repo if you wish.

saveriogzz commented 2 years ago

Thanks @toochevere !