Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set limitnofile #713

Merged
merged 4 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/vsphere-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.MESOSPHERECI_USER_TOKEN }}
VSPHERE_SERVER: ${{ secrets.VSPHERE_SERVER }}
VSPHERE_DATASTORE: ${{ secrets.VSPHERE_DATASTORE }}
VSPHERE_DATACENTER: dc1
VSPHERE_DATACENTER: ${{ secrets.VSPHERE_DATACENTER }}
6 changes: 6 additions & 0 deletions ansible/roles/containerd/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
path: "/etc/systemd/system/containerd.service.d/"
state: directory

- name: Create containerd max files
template:
dest: /etc/systemd/system/containerd.service.d/max-files.conf
src: etc/systemd/system/containerd.service.d/max-files.conf
mode: 0644
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@faiq I started to rebase my molecule test PR #553

it turns out that this part fails with Ubuntu. This is when http_proxy or https_proxyis not set and the first task is not run due to that.

My suggestion:

Move this part after install includes and remove the conditions from directory creation

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@faiq cherry-picking 137be77 should help


- name: Create containerd proxy conf
template:
dest: /etc/systemd/system/containerd.service.d/http-proxy.conf
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Service]
LimitNOFILE=1048576
4 changes: 2 additions & 2 deletions ansible/roles/repo/tasks/redhat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
msg: "WARN: Your system is not using subscription manager fetching packages such as kernel-headers might fail"
when:
- ansible_distribution == 'RedHat'
- rhelorg.subscribed_pool is not defined and rheluser.subscribed_pool is not defined
- rhelorg.subscribed_pool_ids is not defined and rheluser.subscribed_pool_ids is not defined
- ansible_distribution_major_version == '8'

# make sure rhsm can manage repos + refresh and attach if needed
- name: RHEL subscription refresh
shell: subscription-manager config --rhsm.manage_repos=1 && subscription-manager refresh && subscription-manager attach --auto
when:
- ansible_distribution == 'RedHat'
- rhelorg.subscribed_pool is defined or rheluser.subscribed_pool is defined
- rhelorg.subscribed_pool_ids is defined or rheluser.subscribed_pool_ids is defined
- ansible_distribution_major_version == '8'

# The AppStream repo for Centos 8 is not available from centos mirror list.
Expand Down
30 changes: 20 additions & 10 deletions cmd/konvoy-image-wrapper/cmd/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,20 @@ const (

envAzureLocation = "AZURE_LOCATION"

envVSphereServer = "VSPHERE_SERVER"
envVSphereUser = "VSPHERE_USERNAME"
envVSpherePassword = "VSPHERE_PASSWORD"
envRedHatSubscriptionManagerUser = "RHSM_USER"
envRedHatSubscriptionManagerPassword = "RHSM_PASS"
envVSphereSSHUserName = "SSH_USERNAME"
envVSphereSSHPassword = "SSH_PASSWORD"
envVsphereSSHPrivatekeyFile = "SSH_PRIVATE_KEY_FILE"
envVSphereServer = "VSPHERE_SERVER"
envVSphereUser = "VSPHERE_USERNAME"
envVSpherePassword = "VSPHERE_PASSWORD"
envVSphereDatacenter = "VSPHERE_DATACENTER"
envVsphereDatastore = "VSPHERE_DATASTORE"

envRedHatSubscriptionManagerUser = "RHSM_USER"
envRedHatSubscriptionManagerPassword = "RHSM_PASS"
envRedHatSubscriptionManagerActivationKey = "RHSM_ACTIVATION_KEY"
envRedHatSubscriptionManagerOrgID = "RHSM_ORG_ID"

envVSphereSSHUserName = "SSH_USERNAME"
envVSphereSSHPassword = "SSH_PASSWORD"
envVsphereSSHPrivatekeyFile = "SSH_PRIVATE_KEY_FILE"

//nolint:gosec // environment var set by user
envGCPApplicationCredentials = "GOOGLE_APPLICATION_CREDENTIALS"
Expand All @@ -61,7 +67,7 @@ const (

var ErrEnv = errors.New("manifest not support")

func ENvError(o string) error {
func EnvError(o string) error {
return fmt.Errorf("%w: %s", ErrEnv, o)
}

Expand Down Expand Up @@ -125,7 +131,7 @@ func (r *Runner) setUserAndGroups() error {
if err == nil {
gid, err := strconv.Atoi(dockerGroup.Gid)
if err != nil {
return ENvError(fmt.Sprintf("docker gid '%s' is not an int", dockerGroup.Gid))
return EnvError(fmt.Sprintf("docker gid '%s' is not an int", dockerGroup.Gid))
}
r.supplementaryGroupIDs = append(r.supplementaryGroupIDs, gid)
}
Expand Down Expand Up @@ -190,8 +196,12 @@ func (r *Runner) setVSphereEnv() error {
envVSphereServer,
envVSphereUser,
envVSpherePassword,
envVSphereDatacenter,
envVsphereDatastore,
envRedHatSubscriptionManagerUser,
envRedHatSubscriptionManagerPassword,
envRedHatSubscriptionManagerActivationKey,
envRedHatSubscriptionManagerOrgID,
envVSphereSSHUserName,
envVSphereSSHPassword,
} {
Expand Down
2 changes: 1 addition & 1 deletion pkg/packer/manifests/vsphere/packer.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ build {
strip_path = true
}
post-processor "shell-local" {
inline = [ "if ${var.dry_run}; then echo 'destroying VM ${local.vm_name}'; govc vm.destroy -dc=${var.vsphere_datacenter} ${local.vm_name}; fi"]
inline = [ "if ${var.dry_run}; then echo 'destroying VM ${local.vm_name} with command: govc vm.destroy -dc=${var.vsphere_datacenter} ${local.vm_name}'; govc vm.destroy -dc=${var.vsphere_datacenter} ${local.vm_name}; fi"]
environment_vars =[
"GOVC_URL=${var.vcenter_server}",
"GOVC_USERNAME=${var.vsphere_username}",
Expand Down