public static void saveStartType() {
        try {
            Storage storage = new Storage(Config.meta_dir + "/image");
            String hostType = useFqdn ? HostType.FQDN.toString() : HostType.IP.toString();
            storage.writeFeStartFeHostType(hostType);
        } catch (IOException e) {
            LOG.error("fail to write fe start host type:" + e.getMessage());
            System.exit(-1);
        }
    }
@Test
    public void testSaveStartType() throws FileNotFoundException, IOException {
        Config.meta_dir = "feOpTestDir2";
        String metaPath = Config.meta_dir + "/";
        // fqdn
        File dir = new File(metaPath);
        deleteDir(dir);
        mkdir(false, metaPath);
        FrontendOptions.saveStartType();
        String roleFilePath = Config.meta_dir + "/image/ROLE";
        File roleFile = new File(roleFilePath);

        Properties prop = new Properties();
        String hostType;
        try (FileInputStream in = new FileInputStream(roleFile)) {
            prop.load(in);
        }
        hostType = prop.getProperty("hostType", null);
        Assert.assertTrue((hostType.equals("IP") || hostType.equals("FQDN")));
        dir = new File(metaPath);
        deleteDir(dir);
    }