Problem with determining host name in SimFactory 1

Issue #480 closed
Ian Hinder created an issue

On the new Scientific Linux 6 installation at the AEI, SimFactory 1 thinks that the local machine is called localhost.localdomain:

$ simfactory/sim build --thornlist WaveToy.th --optionlist damiana_sl6.cfg Simulation Factory: Configuration name(s) not specified -- using default configuration "sim" Uncaught exception from user code: Unknown machine name "localhost.localdomain" at simfactory/sim line 5061. at simfactory/sim line 5061 main::get_machine('') called at simfactory/sim line 1498 main::command_build() called at simfactory/sim line 454

Looking at the code for get_hostnamealias, it appears to look for all the host name aliases of the current machine and select the first one in the returned list which contains a dot. On the workstation in question, I get:

[ianhin@sl-18 ~]$ hostname -a localhost.localdomain localhost localhost6.localdomain6 localhost6 sl-18 sl-18.damiana.admin

which explains the behaviour. My first reaction would be to filter the list to remove all the "local" aliases. This might break peoples' existing setup. I have seen mailing list posts which indicate that people use localhost as their machine name in simfactory. Since SimFactory 1 is approaching end-of-life, it might just be better to say that you need to use the --hostname option directly if you run into this problem, rather than breaking peoples' existing workflow. Thoughts?

Keyword:

Comments (5)

  1. Erik Schnetter
    • removed comment

    You can create a file .hostname in your home directory, containing the host name of the system.

  2. Barry Wardell
    • removed comment

    On this machine with SimFactory 1 we now always have to specify --hostname anyway. This is because we have two clusters (Damiana and Datura) which share the same head node, but require different machine entries. Both entries have the same aliaspattern, so even if it did find 'damiana' in the hostname, SimFactory still wouldn't know what to do.

  3. Barry Wardell
    • removed comment

    I take that back. They have different aliaspatterns now. You only need to use --hostname when compiling for Datura.

  4. Erik Schnetter
    • changed status to resolved
    • removed comment

    This concerns Simfactory 1, and concerns Damiana/Datura which are a special case anyway (two different machines sharing a front-end). I close this ticket.

  5. Log in to comment