ClickHouse / ClickHouse/1trc

FileNotFoundError for user_settings.xml

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
8
Forks
4
PR merge metrics
No merged PRs in 30d

Description

**Summary**
The program fails during the execution of the Pulumi script while creating AWS resources, specifically when generating a user configuration. The error indicates that the file user_settings.xml is missing in the /tmp/ directory, resulting in a FileNotFoundError.

**Steps to Reproduce**
1. Clone the repository.
2. Set up the environment and dependencies as per the provided instructions.
3. Execute the run.sh script with the following steps:
• Select the dev stack using `pulumi stack select dev`.
• Run ./run.sh.

**Workaround**
Manually moved the `user_settings.xml` file from the resources directory in the /tmp/ directory.

```bash
1trc/aws-starter main*
.venv v3.11.9❯ ./run.sh
Updating (dev)

View in Browser (Ctrl+O): https://app.pulumi.com/chinkit/aws-starter/dev/updates/7

Type Name Status Info
+ pulumi:pulumi:Stack aws-starter-dev **creating failed** 1 error; 2 messages
+ ├─ aws:ec2:Vpc 1trc-vpc created (16s)
+ ├─ aws:ec2:Subnet 1trc-subnet created (3s)
+ ├─ aws:ec2:InternetGateway gw-1trc created (3s)
+ ├─ aws:ec2:SecurityGroup my-1trc-security-group created (7s)
+ ├─ aws:ec2:RouteTable 1trc-internet-route created (3s)
+ ├─ aws:ec2:Instance 1trc_node_1 created (17s)
+ ├─ aws:ec2:Instance 1trc_node_0 created (18s)
+ ├─ aws:ec2:Instance 1trc_node_3 created (19s)
+ ├─ aws:ec2:Instance 1trc_node_7 created (20s)
+ ├─ aws:ec2:Instance 1trc_node_2 created (17s)
+ ├─ aws:ec2:Instance 1trc_node_6 created (18s)
+ ├─ aws:ec2:Instance 1trc_node_5 created (19s)
+ ├─ aws:ec2:Instance 1trc_node_4 created (20s)
+ └─ aws:ec2:RouteTableAssociation 1trc-internet-route-association created (6s)

Diagnostics:
pulumi:pulumi:Stack (aws-starter-dev):
/Users/chinkit/dev/oss/1trc/aws-starter/__main__.py:107: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
user_data=pkg_resources.read_text(resources, "install_clickhouse.sh"),

error: Program failed with an unhandled exception:
Traceback (most recent call last):
File "/Users/chinkit/dev/oss/1trc/aws-starter/__main__.py", line 179, in
lambda args: configure_hosts(args[0], args[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/chinkit/dev/oss/1trc/aws-starter/__main__.py", line 125, in configure_hosts
user_config_file = gen.generate_user_config(password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/chinkit/dev/oss/1trc/aws-starter/config.py", line 37, in generate_user_config
with open(filename, "w") as user_settings_file:
^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: './tmp/user_settings.xml'
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.