Show if this machine matches the mdb

Create issue
Issue #2093 closed
Steven R. Brandt created an issue

It would be useful if Simfactory could tell you whether your machine matches something in the mdb. This pull request makes that work.

See pull request:


Comments (5)

  1. Roland Haas
    • removed comment

    Isn't this already provided by "sim whoami" which gives the name of the machine as seen be simfactory?

    Would you like this to be reviewed (it is still in new state, not "review" yet)?

  2. Steven R. Brandt reporter
    • changed status to open
    • removed comment

    No. The whoami function will not show whether the machine you are on is explicitly supported by simfactory (i.e. whether it matches a pattern in the big list). Instead, whoami happily show you the mdb entry it auto-generated (if you run it after "sim setup").

    Also, it's possible your machine can match more than one pattern in the list.

  3. Roland Haas
    • removed comment

    If more than one pattern in the mdb matches the machine hostname then the machine database if faulty since simfactory will end up having to use one of them and which one it will use is at best not documented and at worst depends on the order in which the machine.ini files are inspected (ie on the order in which the file system presents them).

    I am fine with whomami showing the auto-generated name since that is the machine that I am on after all. After sim-setup is done there is no difference anymore between machines whose description file is part of simfactories repo and those which are generated by sim-setup so I do not see how this command can distinguish between them.

    The only reason it works is that sim-setup leaves aliaspattern to be ^generic\.some\.where$ which seems like a good candidate to have sim-setup to actually set to the hostname in the near future.

    So it seems to me as if the only new thing that this command offers is to detect if the current machine definition file was created by sim-setup or not. However this detection is based on a side effect of sim-setup (and eg could also happen if a user on a cluster does not set alias pattern).

    To me it also seems as if a machine whose machine.ini file was created by sim-setup and then adjusted by the user is explicitly supported (such as my workstation, at least for me).

    So I would like to rather not add this feature to the list-machines command since it does not add much and what it adds is fragile as it depends on details of the machine.ini file that we cannot enforce and do not document.

  4. Log in to comment