API doesn't work in 1.5.9 dev. Error in route.class.php


  • We have upgraded a Ubuntu 18 server that was running 1.5.7 to Ubuntu 22.04 and FOG 1.5.9 dev branch (required because of PHP version check).

    The UI works, but any call to the API fails, the Apache error log shows this:

    Got error 'PHP message: PHP Fatal error:  Uncaught Error: Unknown named parameter $method in /var/www/fog/lib/router/route.class.php:351\nStack trace:\n#0 /var/www/fog/lib/router/route.class.php(231): Route::runMatches()\n#1 /var/www/fog/api/index.php(23): Route->__construct()\n#2 {main}\n  thrown in /var/www/fog/lib/router/route.class.php on line 351'
    

    Is this easy to fix?
    Otherwise, do you already have a timeline for a new FOG release that works on Ubuntu 22?


  • @abulhol said in API doesn't work in 1.5.9 dev. Error in route.class.php:

    Do you have automated tests for the API?

    I do not. But, if someone created some I would be happy to add them to the daily tests.


  • @wayne-workman I have looked at your daily tests, it looks like they only confirm that the installer runs successfully.
    Do you have automated tests for the API? Please let me know when you have had a look at this.


  • @wayne-workman Actually the migration seemed to have worked very well overall, given that we used the dev branch.
    The web UI works fine, it’s only the API that is returning errors.
    So to me it looks more like a PHP problem not related to our instance specifically.
    We will likely wait for your next release that officially supports Ubuntu 22, but we would very much appreciate if you could take a look at the API issue.


  • @nono I’m not suggesting either of the options you listed, I suggest to migrate to a new box.


  • @wayne-workman Hi, thanks for the tip.
    In case we’re not in the position to migrate to a new server. What are you suggesting ?
    A) Doing all the backup (for the migration), then uninstalling/removing FOG, then upgrade the OS to reinstall fog after then upgrade ?
    or
    B) Upgrade FOG to the latest version, then upgrade the OS ?

    I can understand that a “proper” migration is always better, but that wouldn’t be far from removing all, then re-install properly, right ?


  • @abulhol Upgrading the OS that FOG runs on has mixed results. Sometimes it works, but usually does not. Generally it’s not advised to upgrade the OS to a new major version due to this. It’s usually advised to migrate your FOG server to a new home that has the new OS. There’s a guide for this, and you should still be able to do this even though your old FOG server is broke. https://wiki.fogproject.org/wiki/index.php?title=Migrate_FOG

370
Online

9.7k
Users

16.1k
Topics

148.4k
Posts