Zumba\PhantomJSExtension extension file or class could not be located.

I'm using mink with behat, and when I'm starting behat, I get this error message:
`Zumba\PhantomJSExtension` extension file or class could not be located.
Hints:

I installed it using composer as shown at https://github.com/jcalderonzumba/MinkPhantomJSDriver#installation--compatibility
I'm new to PhantomJS. However, I'm getting some page when I open http://<IP_ADDRESS>:8510/api in the browser. So it looks like it's up and running :-)
Are you sure that at https://github.com/jcalderonzumba/MinkPhantomJSDriver/blob/master/README.md#how-to-use the line Zumba\PhantomJSExtension: is correct? No ~ and no indendation on the next line?
I haven't used this anywhere, since I figure I don't need it when using behat:
$driver = new Zumba\Mink\Driver\PhantomJSDriver('http://localhost:8510');
Behat is working, when I switch back to selenium2

Thank you!

If you want to use this driver with behat you need to modify your composer.json and add the following package.
https://github.com/jcalderonzumba/MinkPhantomJSExtension
you can check https://github.com/jcalderonzumba/MinkPhantomJSExtension/blob/master/behat.yml for an example of the behat.yml

Thanks! I think this should be explained in readme.md!
I'm closing this issue.


Suggestion: Unbox Poke

Partial followup to https://github.com/haskell-perf/strict-bytestring-builders/pull/6 .
ptr-poker uses the following type for low-level pokes:
Ptr Word8 -> IO (Ptr Word8)

I believe unboxing would improve performance:
Addr# -> State# RealWorld -> (# State# RealWorld, Addr# #) }

Ptrs are data boxed, so this should remove some indirection. We have to unbox IO because it's not levity-polymorphic.
This representation gave me consistent better performance both over in https://github.com/haskell-perf/strict-bytestring-builders and in a less synthetic benchmark here, serializing lots of Word8s and ByteStrings. Main code is currently here. (Some tests in that repo also assert basic soundness.)
What do you think? If you found it appealing I would gladly merge my code in here. Otherwise I'd like to publish my lib on Hackage with attribution for the idea.

Awesome :) It will be a fairly big changeset that touches lots of the poking code. I might need some help confirming that certain bits are safe/sensible. I'll start a PR later

after a discussion with merijn on #haskell IRC I want to confirm the performance changes I saw -- since I might've been using an older version of ptr-poker and I use a potentially faster bytestring serializer (which could be used here too if safe). apparently it's a little surprising that there was such a difference by unboxing Ptrs and IO

I need more benchmarks to figure out what's going on. By replacing withForeignPtr with unsafeWithForeignPtr for serializing bytestrings, all the https://github.com/haskell-perf/strict-bytestring-builders benchmarks improve tremendously. In context:
poke :: ByteString -> Ptr Word8 -> IO (Ptr Word8)
poke (BS fptr length) ptr =
  {-# SCC "poke" #-}
  unsafeWithForeignPtr fptr $ \ bytesPtr ->
    memcpy ptr bytesPtr length $>
    plusPtr ptr length

fumieval's mason uses it here (implementation copied from GHC for compat) in the same way, exclusively for bytestring serialization.
However, swapping to withForeignPtr in my library and running a generics-based benchmark changes absolutely nothing. So I'm currently unsure where the performance improvement is being introduced.

Benching serializing ~5kb of bytestrings on my lib vs. the latest commit on this repo still says my lib is faster. The only thing that should be happening there is bytestring serializing (identical) and generics -- where the code is identical, so it would appear to come from the semigroup instance.
So it would appear this is worthwhile. It's a shame the benchmarks are so all over the place.


Moves the mouse to the corner before taking a screenshot.

Prevents thus mouse from covering loot.
Here an example where this might have happened (ring got not picked up).

Thanks for the feedback. Will think about it.

Didn't have time recently to work on this. Shall this be closed for now, @aeon0?

Stale PR


terraform-graph-beautifier: Add Version 0.2.0

What type of Apps related PR is this? (check all applicable)

[x] ✨ Add Manifest
[ ] ♻ Refactor
[ ] 🐛 Bug Fix
[ ] 👷 Optimization
[ ] 🚩 Other

Description
Add Terraform graph beatifier CLI
Related Tickets & Documents
Not
Did you verify the followings
Add/Modify a description in the manifest?

[x] 👍 yes
[ ] 🙋 yes, but I need help
[ ] 🙅 no, because they aren't needed

Check URLs?

[x] 👍 yes
[ ] 🙋 yes, but I need help
[ ] 🙅 no, because they aren't needed

Update to the latest version?

[x] 👍 yes
[ ] 🙋 yes, but I need help
[ ] 🙅 no, because they aren't needed

Update Hashes?

[x] 👍 yes
[ ] 🙋 yes, but I need help
[ ] 🙅 no, because they aren't needed

Format the json manifest?

[x] 👍 yes
[ ] 🙋 yes, but I need help
[ ] 🙅 no, because they aren't needed

Did you identify extra steps
Notes in the manifest?

[ ] 👍 yes
[ ] 🙋 yes, but I need help
[x] 🙅 no, because they aren't needed

Application Dependencies?

[ ] 👍 yes
[ ] 🙋 yes, but I need help
[x] 🙅 no, because they aren't needed

Application Suggestions?

[x] 👍 yes
[ ] 🙋 yes, but I need help
[ ] 🙅 no, because they aren't needed

Pre-installation steps to perform?

[ ] 👍 yes
[ ] 🙋 yes, but I need help
[x] 🙅 no, because they aren't needed

Post-installation steps to perform?

[ ] 👍 yes
[ ] 🙋 yes, but I need help
[x] 🙅 no, because they aren't needed

File persistence to perform?

[ ] 👍 yes
[ ] 🙋 yes, but I need help
[x] 🙅 no, because they aren't needed

[optional] What gif/emoji best describes this PR or how it makes you feel?

:bar_chart: :lipstick:

All changes look good.
Wait for review from human collaborators.
terraform-graph-beautifier

[x] Description
[x] License
[x] Hashes
[x] Checkver
[x] Autoupdate
[x] Autoupdate Hash Extraction


Unable to import 'load_openai'PylintE0401:import-error

Pylint is showing false positives on imports. I dunno why.
I'm running a venv and I installed it: pip install pylint

 Environment data

Language Server version: 2023.6.30
OS and version: win32 x64
Python version (and distribution if applicable, e.g. Anaconda):
python.analysis.indexing: true
python.analysis.typeCheckingMode: basic

 Code Snippet

XXX

 Repro Steps

XXX

 Expected behavior
XXX
 Actual behavior
XXX
 Logs

XXX

Hi @RicardoEscobar! Apologies for the delay in our response. Are you using the Pylint extension?
I'd recommend using that  since it ships with pylint, so you don't need to install it in your environment. In any case, I'd recommend running the "Python: Select Interpreter" command from the Command Palette (View > Command Palette...) and selecting the virtual environment you are using in the terminal 😊
In the mean time I'm going to transfer this issue to the Pylint extension repository


Import does not work because dependencies are not listed correctly.

🔍 Before submitting the issue

[X] I have searched among the existing issues
[X] I am using a Python virtual environment

🐞 Description of the bug
Importing the package does not work, because the dependency on ansys-engineeringworkflow-api is listed only as a test dependency.
📝 Steps to reproduce

Install the ModelCenter API package: pip install ansys-modelcenter-workflow
Then, from within the Python interpreter, attempt to import it: import ansys.modelcenter.workflow.grpc_modelcenter as grpcmc

The import fails, with the following error:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\mkoninck\repro_venv\lib\site-packages\ansys\modelcenter\workflow\grpc_modelcenter\__init__.py", line 28, in <module>
    from .abstract_workflow_element import UnsupportedWorkflowElement
  File "C:\Users\mkoninck\repro_venv\lib\site-packages\ansys\modelcenter\workflow\grpc_modelcenter\abstract_workflow_element.py", line 27, in <module>
    import ansys.engineeringworkflow.api as aew_api
ModuleNotFoundError: No module named 'ansys.engineeringworkflow'

Inspection of the pyproject.toml for this package shows that ansys-engineeringworkflow-api is listed only as a test dependency (which allows the CI tests to pass even though an end user will inevitably encounter this). Manual installation of ansys-engineeringworkflow-api allows this package to function, and can be used as a workaround at the moment.
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
2024R1
🐍 Which Python version are you using?
3.10
📦 Installed packages
(repro_venv) C:\Users\mkoninck\repro_venv>python -m pip freeze
ansys-api-modelcenter==0.3.1
ansys-api-platform-instancemanagement==1.0.0
ansys-modelcenter-workflow==0.1.0
ansys-platform-instancemanagement==1.1.2
anyio==4.3.0
exceptiongroup==1.2.0
grpcio==1.62.1
idna==3.6
importlib_metadata==7.1.0
numpy==1.26.4
overrides==7.7.0
protobuf==4.25.3
pyansys-tools-variableinterop==0.1.1
sniffio==1.3.1
typing_extensions==4.10.0
zipp==3.18.1

Release 0.1.1 provides a fix for this issue as a hotfix.


Update text for 'bought satisfaction' in player app

The bought measure confirmation shows:

The 'bought satisfaction' should disappear. The text should read "house and personal measures'.

Texts have been adapted.


Pandas dataframe History objects should map the integer weekdays 0 to 6 from Monday to Sunday

Expected Behavior
Pandas dataframe History objects should map the integer weekdays 0 to 6 from Monday to Sunday.
See reference:
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DatetimeIndex.dayofweek.html for
Actual Behavior
Instead, they appear to only return values on the range 1 to 5.
Potential Solution
I am not sure!
Reproducing the Problem
history = history.open.unstack(0)
dayofweek = history.index.dayofweek
check_day= history.iloc[dayofweek==0]
If you then check the length of check_day, it is empty
But,
history = history.open.unstack(0)
dayofweek = history.index.dayofweek
check_day= history.iloc[dayofweek==1]
Returns a number of days that seems reasonable in my lookback period of 60. (about 10)
I also checked 6, which returns nothing, and 7, which returns again nothing. But 5 returns again a reasonable number of days.
I have not checked the actual dates to check that for example, to see what dayofweek==1 maps to in terms of real calendar day of weeks. That might be worth investigating.
System Information
Running on the Online IDE on www.quantconnect.com with Python
Checklist

[☑ ] I have completely filled out this template
[ ] I have confirmed that this issue exists on the current master branch ( I do not know how up to date Web Lean is)
[ ☑] I have confirmed that this is not a duplicate issue by searching issues

[☑ ] I have provided detailed steps to reproduce the issue

@rosswendt Is this that there's no data for Sat-Sun? Please post with a share backtest link to reopen the issue -


Move brightness and theme listener ownership to fragments

On first install (and any time the app is started while connected to the wrong service, such as mock service), the activity is not listening to the correct signals to update brightness and theme, causing it to not update brightness or theme when the car updates.
This is because the fullscreen activity listens to carState upon startup, and can't (easily) be changed to listen to a new carState when the service changes.
To get around this issue, we move theme and brightness listener ownership back into each fragment, as the fragments are recreated upon changing the service. To reduce code duplication, the viewModel hosts the theme and brightness listener code. The fragments trigger the activity to update via a viewmodel livedata boolean, as the theme and brightness updates are handled by the activity, not the fragments.

This can't be in a utility function in a separate file? It looks like a lot of copy pasta

Good point. I was able to keep the fragments as the owners but move the bulk of the code to the view model.


ENH: Change column names for count collector

The names of the columns are more generic now, and we've added 2 columns
that show the fraction of reads passing QC and the fraction of reads
passing the human filter.
cc @adswafford

Thanks so much!

On Sep 29, 2021, at 9:36 AM, Charles Cowart @.***> wrote:
Merged #37 into master.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.


Error on the settling and cancelling requests

Here is the code for the requests:
from solana.account import Account
from solana.publickey import PublicKey
from spl.token.client import Token
from solana.rpc.types import TxOpts
from solana.rpc import api
from spl.token.constants import TOKEN_PROGRAM_ID
from pyserum.market import Market
from pyserum.market import State
from pyserum.enums import OrderType, Side
from pyserum.open_orders_account import OpenOrdersAccount
from pyserum.connection import conn, get_live_markets, get_token_mints
import binascii, hashlib
import base58
import json
import sys

cc = conn("https://api.mainnet-beta.solana.com/")

mid = base58.b58decode('priv_key')
payer = Account(mid[:32])

market_address = BTC_USDC
market = Market.load(cc, market_address)

open_orders_account = market.find_open_orders_accounts_for_owner(owner_address=PublicKey('XWvGei1tGvZwyXzt1Tnfx42Bb5pzTaJUSP8MgjosdFQ'))
print(open_orders_account[0].address)

if sys.argv[1] == 'set':
    settl = market.settle_funds(
        owner=payer,
        open_orders=PublicKey(open_orders_account[0].owner),
        base_wallet='XWvGei1tGvZwyXzt1Tnfx42Bb5pzTaJUSP8MgjosdFQ',
        quote_wallet='Hrr32WnYSqikhRRjHUpVTDarTApKUPu3fgdozg9PYrcZ'
    )

    print(settl)

if sys.argv[1] == 'can':
    canc = market.cancel_order_by_client_id(
        owner=payer,
        open_orders_account=PublicKey(open_orders_account[0].address),
        client_id=1
    )

    print(canc)

And you're still getting these same errors?
https://github.com/serum-community/pyserum/issues/46#issuecomment-739333263

yes the same for cancelling, but no about the settelling, i have tried so much things... don't remember what it was, but now i have:
'PublicKey' object has no attribute 'owner'

i see that i've forget in my copy/paste above the market:
# Markets
BTC_USDC = PublicKey("CVfYa8RGXnuDBeGmniCcdkBwoLqVxh92xB1JqgRQx3F")

yeah, remember what i did for settelling...
if sys.argv[1] == 'set':
    settl = market.settle_funds(
        owner=payer,
        open_orders=open_orders_account[0],
        base_wallet='XWvGei1tGvZwyXzt1Tnfx42Bb5pzTaJUSP8MgjosdFQ',
        quote_wallet='Hrr32WnYSqikhRRjHUpVTDarTApKUPu3fgdozg9PYrcZ'
    )

    print(settl)

it's the same error, i post you earlier.

Not sure if this will solve your problem, but base_wallet and quote_wallet should be of type PublicKey.

hi, i change to Publickey, but same error, failling to send:
{'code': -32002, 'message': 'Transaction simulation failed: Error processing Instruction 0: custom program error: 0x10006c0', 'data': {'err': {'I
nstructionError': [0, {'Custom': 16778944}]}, 'logs': ['Call BPF program EUqojwWA2rd19FZrzeBncJsm38Jm1hEhE3zsmX3bRc2o', 'BPF program consumed 452
4 of 200000 units', 'BPF program EUqojwWA2rd19FZrzeBncJsm38Jm1hEhE3zsmX3bRc2o failed: custom program error: 0x10006c0']}}
Traceback (most recent call last):
  File ".\git_scr.py", line 34, in <module>
    settl = market.settle_funds(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyserum\market\market.py", line 358, in settle_funds
    return self._conn.send_transaction(transaction, owner, opts=opts)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\solana\rpc\api.py", line 973, in send_transaction
    return self.send_raw_transaction(txn.serialize(), opts=opts)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\solana\rpc\api.py", line 940, in send_raw_transaction
    return self.__post_send(resp, opts.skip_confirmation, opts.preflight_commitment)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\solana\rpc\api.py", line 1043, in __post_send
    raise Exception("Failed to send transaction")

but about cancellation, here is the solution:
if sys.argv[1] == 'can':
    canc = market.cancel_order(
        owner=payer,
        order=market.load_orders_for_owner('XWvGei1tGvZwyXzt1Tnfx42Bb5pzTaJUSP8MgjosdFQ')[0]
    )

it work just fine with this!

Issue resolved after troubleshooting on Discord.

Issue resolved after troubleshooting on Discord.

you mean the error realted to settle_funds was solved?
Can you point to the discord solution link? I'm also having the same err while setting funds

it's maybe the mint token wallet address, which is not the good ones, you entered!
here's the link:
https://discord.com/channels/739225212658122886/752530209848295555/784943433869557790
and here a script i did to make interact with pyserum easy:
https://github.com/kal1er/simpleClient-for-pyserum


automatic remappings detection

As title, right now we need to either manually specify them or via the DAPP_REMAPPINGS env var

Closed in #104


More things to test on the cache

The deleteDirty() function is unused and that irks me. I was thinking about that and I think we’re missing test coverage when we mark a file as dirty but then fail to write it to the disk.
Some tests to write:

[ ] Successfully mark as dirty in the DB, writing the file to disk fails. This should be a silent failure and the load should succeed
[ ] Successfully mark as dirty in the DB, then the program exits. We should recover on next launch.
[ ] Successfully mark as dirty in the DB, completely write the file to disk, and the program exits. We should recover on next launch
[ ] Successfully mark as dirty in the DB, partially write the file to disk, and the program exits. We should recover on next launch
[ ] Successfully mark as dirty in the DB, write the file to disk, and the on-disk file's checksum doesn't match. We should fallback to downloading the file. And prune the partial download.

Fixed. https://github.com/cashapp/zipline/pull/610


VCPKG_DEFAULT_TRIPLET being ignored

Describe the bug
When building under windows the following successfully installs all my dependencies from my manifest file:
export VCPKG_DEFAULT_TRIPLET=x64-mingw-dynamic
export VCPKG_HOST_TRIPLET=x64-mingw-dynamic
vcpkg/vcpkg install

However I have vcpkg integrated with CMake,
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
  CACHE STRING "Vcpkg toolchain file")

and when I replace the call to "vcpkg/vcpkg install" with the call to "cmake", then it prints
-- Running vcpkg install
Detecting compiler hash for triplet x64-mingw-dynamic...
error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance

It seems that the triplet environment var is lost somewhere. This works fine on a macos.
Environment

OS: windows
Compiler: clang/gcc

To Reproduce
I can add a minimal example if needed.
Expected behavior
The integration with CMake should honour the triplet settings.

Amazing, nothing like asking for help to find a solution. It seems I had to set VCPKG_TARGET_TRIPLET instead...


Eliminate redundant variable with direct returns in the if statement

As we have else clause to handle the last case, it is easy to return inside the if/elif pairs rather than to assign the value to the brand variable.

I don't think this is significant to require a change.


Update http4s-async-http-client, ... to 0.21.14

Updates

org.http4s:http4s-async-http-client
org.http4s:http4s-circe

from 0.21.6 to 0.21.14.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.http4s" } ]

labels: library-update, semver-patch

Superseded by #58.

Superseded by #58.


Add command line options

This PR allows usage of command line options. This should make it easier to do hyperparameter tuning.

adds too much complexity to add to the main file. but I'll leave the PR open in case people wanna see the code as an example.


common: Include privapp-permissions file directly through TransPowerCommon library

The current setup is far from ideal and extremely error-prone as it requires every device to depend on this file individually in addition to TransPowerSensors (depends on TransPowerCommon under the hood), also because this package is configured per device instead of per platform/board, or straight in the common device repo...
Disclaimer: THIS CHANGE HAS NOT BEEN BUILD-TESTED.  @jerpelea please drop the dependency from all device repos again to clean up the mess and to prevent build errors as this PR also renames the prebuilt_etc target name (without changing stem) to match what we do in modemconfig.

tested ok

cherry-picked


GEODE-6811: refactor MemberStatus in ClusterManagementResult

…rned results.

change memberStatus in ClusterManagementResult to use RealizationResult

Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

[ ] Has your PR been rebased against the latest commit within the target branch (typically develop)?

[ ] Is your initial contribution a single, squashed commit?

[ ] Does gradlew build run cleanly?

[ ] Have you written or updated unit tests to verify your changes?

[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

Note:
Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to<EMAIL_ADDRESS>

@Petahhh @jackw26 @jmelchio

This looks good to me. I like that we have a consistent object to work with when interacting with Realizers.


[oracle] let oracle-cdc connect to PDB CDB old non-CDB successfully

[oracle] The general dbname should be SERVICE_NAME but not INSTANCE_NAME in the lsnrctl status output, especially connect to PDB in CDB  it must be SERVICE_NAME now, of course we should support both of the two features in the future.

And with this change can resolve the ERROR: oracle.net.ns.NetException: Invalid number format for port number when oracle listener does not support SID like PDB

cc @leonardBang this PR is in version 2.2.0, but not merge.

Supported in 2.3, see https://github.com/ververica/flink-cdc-connectors/issues/1244


Create Linux Recipe for F5

Documentation:
Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-50

De-scoped, believe this is a hardware component meant to be monitored remotely.


Is "Security considerations" on the main page correct?

Describe the bug
This is the warning on the home page:
"The AWS Secrets Manager and Config Provider provides compatibility for legacy applications that access secrets as mounted files in the pod. Security conscious applications should use the native AWS APIs to fetch secrets and optionally cache them in memory rather than storing them in the file system."
Given the ephemeral nature of the volume mounts, how is mounting a file in the pod any less secure than manually using AWS APIs to fetch secrets and cache them in memory? Both options represent an in-memory caching and if you have access to one, you have access to the other.
To Reproduce
Steps to reproduce the behavior:
Do you also notice this bug when using a different secrets store provider (Vault/Azure/GCP...)? Yes/No
If yes, the issue is likely with the k8s Secrets Store CSI driver, not the AWS provider. Open an issue in that repo.
Expected behavior
Environment:
OS, Go version, etc.
Additional context
Add any other context about the problem here.

Secrets fetched with our caching library can be encrypted while cached by providing a custom cache hook (here in the Java caching library). Secrets Manager APIs are the native way to access secrets in your application.
I know you specifically asked about volume mounts, but if you wanted to store secrets from AWS Secrets Manager as Kubernetes Secrets, there are some caveats outlined in the Kubernetes documentation on the subject to be mindful of.


install postgresql issue

pg_createcluster 9.5 main --start
Creating new cluster 9.5/main ...
  config /etc/postgresql/9.5/main
  data   /var/lib/postgresql/9.5/main
  locale en_US.UTF-8
FATAL:  could not create shared memory segment: Invalid argument
DETAIL:  Failed system call was shmget(key=1, size=56, 03600).
HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter, or possibly that it is less than your kernel's SHMMIN parameter.
        The PostgreSQL documentation contains more information about shared memory configuration.
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/9.5/main"
Error: initdb failed

sysctl -w kernel.shmmax=1
sysctl: cannot stat /proc/sys/kernel/shmmax: No such file or directory

I had the same error yesterday. It appears that writing on some folders or creating symlinks are problematic in WSL right now.

Has anyone found a workaround for this?

Seems like there's no proper System V shared memory support at the moment.

No workouronds yet?

Same issue here with build 14352.rs1_release.160522-1930. Any fixes on this yet? It's the final piece of the puzzle for my workflow!
Output below:
rob@DESKTOP-NQ3AL5E:~$ sudo apt-get install postgresql postgresql-common
[sudo] password for rob:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libossp-uuid16 libxslt1.1 os-prober
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  postgresql-9.3 postgresql-client-9.3 postgresql-client-common
Suggested packages:
  oidentd ident-server locales-all postgresql-doc-9.3
The following NEW packages will be installed:
  postgresql postgresql-9.3 postgresql-client-9.3 postgresql-client-common
  postgresql-common
0 upgraded, 5 newly installed, 0 to remove and 40 not upgraded.
Need to get 0 B/3,603 kB of archives.
After this operation, 15.2 MB of additional disk space will be used.
Preconfiguring packages .../n] y
E: Can not write log (Is /dev/pts mounted?) - openpty (2: No such file or directory)
Selecting previously unselected package postgresql-client-common.
(Reading database ... 32749 files and directories currently installed.)
Preparing to unpack .../postgresql-client-common_154ubuntu1_all.deb ...
Unpacking postgresql-client-common (154ubuntu1) ...
Selecting previously unselected package postgresql-client-9.3.
Preparing to unpack .../postgresql-client-9.3_9.3.13-0ubuntu0.14.04_amd64.deb ...
Unpacking postgresql-client-9.3 (9.3.13-0ubuntu0.14.04) ...
Selecting previously unselected package postgresql-common.
Preparing to unpack .../postgresql-common_154ubuntu1_all.deb ...
Adding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Unpacking postgresql-common (154ubuntu1) ...
Selecting previously unselected package postgresql-9.3.
Preparing to unpack .../postgresql-9.3_9.3.13-0ubuntu0.14.04_amd64.deb ...
Unpacking postgresql-9.3 (9.3.13-0ubuntu0.14.04) ...
Selecting previously unselected package postgresql.
Preparing to unpack .../postgresql_9.3+154ubuntu1_all.deb ...
Unpacking postgresql (9.3+154ubuntu1) ...
Processing triggers for man-db (<IP_ADDRESS>-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up postgresql-client-common (154ubuntu1) ...
Setting up postgresql-client-9.3 (9.3.13-0ubuntu0.14.04) ...
update-alternatives: using /usr/share/postgresql/9.3/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode
Setting up postgresql-common (154ubuntu1) ...

Creating config file /etc/logrotate.d/postgresql-common with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for ureadahead (0.100.0-16) ...
Setting up postgresql-9.3 (9.3.13-0ubuntu0.14.04) ...
Creating new cluster 9.3/main ...
  config /etc/postgresql/9.3/main
  data   /var/lib/postgresql/9.3/main
  locale C
FATAL:  could not create shared memory segment: Function not implemented
DETAIL:  Failed system call was shmget(key=1, size=48, 03600).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/9.3/main"
Error: initdb failed
Error: could not create default cluster. Please create it manually with

  pg_createcluster 9.3 main --start

or a similar command (see 'man pg_createcluster').
update-alternatives: using /usr/share/postgresql/9.3/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Setting up postgresql (9.3+154ubuntu1) ...
rob@DESKTOP-NQ3AL5E:~$ sudo pg_createcluster 9.3 main --start
Creating new cluster 9.3/main ...
  config /etc/postgresql/9.3/main
  data   /var/lib/postgresql/9.3/main
  locale en_US.UTF-8
FATAL:  could not create shared memory segment: Function not implemented
DETAIL:  Failed system call was shmget(key=1, size=48, 03600).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/9.3/main"
Error: initdb failed

Still waiting on this.

One of the things holding me from developing on windows with Ruby.

@the-ult postres works great on windows and Ruby on rails on WSL

So you don't get an error while installing postgres on WSL?
Which version of postgres are you using?

The combination. You don't use postgres as a process, you access it over a port so there should be no issues there

Thanks, didn't think of it that way.
Gonna try it out.
Op vr 17 jun. 2016 23:05 schreef SRGOM<EMAIL_ADDRESS>
The combination. You don't use postgres as a process, you access it over a
port so there should be no issues there
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/BashOnWindows/issues/61#issuecomment-226881345,
or mute the thread
https://github.com/notifications/unsubscribe/AEo0Vj99_9zBZtrF5rFHiLNe6_bqnT9rks5qMwwOgaJpZM4IC15g
.

--
met vriendelijke groet,
Arjen
M 06-51 800 419
W www.payt.nl

I got the same error on a new release -  build 14367.rs1_release.160613-1700. Can anyone find a solution?

Someone has to implement that call to the kernel.

Hi!
Can someone please describe how to connect to postgres on the host, like @SRGOM mentioned?
Thanks!

@glebovsky it should work just as it would in Unix. Install rails in wsl, postgres on windows. Now connect to postgres as you usually would (ip: <IP_ADDRESS>, port:5902?)
I haven't tried it tbh but I know if one issue right now that would prevent it from working.

I am successfully connecting my Rails app running in WSL to Postgres on Windows. I don't recall doing anything special to make that happen.

@SRGOM Thanks! Just tried it and it works perfectly.

@SRGOM Thank you. When installing Postgres on Windows normally. You can consider this alternative, until they make proper implementation in bash.
Recipe for those who have problems:

Set Postgres for Windows.
Start the server Postgres.
Connect to the database server, as is usually done in the unix;

For records, I'm receiving the same issue on Build 14372.rs1_release.160620-2343, trying to install postgresql 9.4
$ sudo pg_createcluster 9.4 main
Creating new cluster 9.4/main ...
config /etc/postgresql/9.4/main
data   /var/lib/postgresql/9.4/main
locale en_US.UTF-8
FATAL:  could not create shared memory segment: Function not implemented
DETAIL:  Failed system call was shmget(key=1, size=56, 03600).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/9.4/main"
Error: initdb failed

I have the same error of @pavelbulanov (in italian):
Creating new cluster 9.3/main ...
  config /etc/postgresql/9.3/main
  data   /var/lib/postgresql/9.3/main
  locale it_IT.UTF-8
FATALE:  creazione del segmento di memoria condivisa fallita: Funzione non implementata
DETTAGLI:  La chiamata di sistema fallita era shmget(key=1, size=48, 03600).
processo figlio uscito con codice di uscita 1
initdb: rimozione dei contenuti della directory dati "/var/lib/postgresql/9.3/main"
Error: initdb failed

Still unable to install postgres with build 1607:
Setting up postgresql-common (154ubuntu1) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Setting up postgresql-9.3 (9.3.13-0ubuntu0.14.04) ...
update-alternatives: using /usr/share/postgresql/9.3/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

If there is no specific reason you want it in Linux, I'd say install the server on Windows. You're anyway communicating using ports.

I can think of at least a couple of reasons I don't want Postgres running on Windows and one involves just not wanting the service constantly running in the background when it can be turned on/off by starting/stopping Bash; having to actually open up the services applet to shut it off/turn it on is kind of inconvenient when I'm only using it for the purpose of development. Two, I read that developers were talking about ending support for the Windows port on a mailing list because it's difficult to maintain.
Until this is fixed, I'm sticking with my virtual machine.

While I understand your concerns, I don't see why that should force you to not install in Windows? Install in Windows now, and when it works in Linux and stops working in Windows (whichver is later, of course), pg_dump in Windows and move to Linux?
I don't see any benefit in using a VM. Sorry I know this is an unsolicited advice but just my two cents.

I think that, for me, it's just a matter of convenience. Right now, I unpause my VM and go. If I wanted to start using Bash I'd have to start the Postgres service and then start Bash because I would prefer not to have the service running in the background. Call me paranoid.

I have Ubuntu 14.04 and Windows 10 on the same machine, and frankly my stack is waaaayyyyy slower in Windows 10 with the server code running in the shell and postgres installed on Windows.
I'm not sure yet what could be the cause of this:

windows psql install being generally slower than its unix counterpart
extra network layers caused by the fact that I can't connect to psql through a unix socket
-something else entirely (maybe the shell integration layers themselves)

But I sure as hell would like to compare, because the difference is extremely noticeable.

@dbo-odoo, it's unlikely related with postgres, unfortunately - it more looks like overall slowdown in some kind of operations inside bash
if possible, try doing kind of hack for your app to not use db (use static stubs instead) and measure
for me, starting rails server (which doesn't do any postgresql queries) takes like 5-7 secs, comparing to 1-2 secs inside Ubuntu virtual machine (on the same hardware and with lack of resources for VM)

@dbo-odoo -- curious, can you quantify "extremely noticeable"?  For you, is that like 20% slower?  100x slower?

@pavelbulanov yeah that's not something I'm gonna be able to do easily, but if I do have time i'll test it
@aseering I'd say along the lines of 2-4x slower (as a gross estimation)
If I do some benchmark I'll post them here.

You guys should definitely start new issues for this. I bet Microsoft would like to know more. In my limited time with wsl (I'm blocked on #216) I've not noticed perf difference though but wouldn't be surprised if there is...

I'm also experiencing significantly slower start up times for rails server. The report below shows benchmark results for bash on Windows, and apparently File IO performance can be over 6 times slower than on Ubuntu!
http://www.techrepublic.com/article/windows-10-how-well-does-it-run-ubuntu-bash/

@alexssung yep, I believe @russalex said that the file i/o is the main bottleneck in his //build/ conference presentation

I experienced the same issue, trying to install PostgreSQL 9.5 for my django. There was no error reported when installing, but something went wrong when creating database superuser and templates.

@fqpc, do you know if i/o slowdown is relevant to bash working with both file systems, VolFs  and Windows f/s via mnt?

@pavelbulanov the best place to ask would probably be in a new thread and ping russalex in it

Happy to answer this one here.
The file system performance hit happens on both VolFs and DrvFs.  VolFs may actually be slightly faster in some situations simply due to the amount of caching we do there, but in most cases the perf will be very similar between the two.
Throwing a quick shout out to @SvenGroot's excellent file system blog post here.  It does help explain a lot.

@russalex thanks for checking in!
I just re-read the article in blog. It explains how it works, but I didn't find any specific hint on what can cause slowdown in both scenarios. Can you give any clue? And, obviously, any thought on whether this could (and would) be fixed. Maybe creation of 3rd simplified (limited) but fast file system driver for cases like compilation or interpretation of massive code projects with thousands of files.
On the slowdown, is it caused by "just-in-time" creation of inodes based on NTFS Extended Attributes? If this would be the case, using DrvFs should be faster as I understand it doesn't query EA for files (besides not using cache, though). Mapping various types of descriptors (Windows file objects to Linux objects and descriptors) shouldn't take long, I believe.

I can go into a bit more detail but we will quickly get out of my depth and I'll need to pull in a dev working on the problem.
At it's core, this  perf delta is more about the differences in philosophies between how Linux and Windows interact with their file systems.  I am not going to call one better than the other, it's simply that they behave in very different priorities / implementations (example would be path resolution).  With our goal of binary compatibility, both VolFs and DrvFs must look like a Linux file system to Ubuntu and apps.  Over the years apps have come to expect specific file system behavior, or have optimized around "cheap" calls.  This is disrupted with WSL where calls that were cheap before can be expensive now.  Since there is no modification to the app's binaries this can cause some slowdown.
The good news is that we're looking at it.  We have been talking with various teams around MSFT to see what types of improvements we can make.  Still too early to make any promises or guarantees, but I will say that this is something we know needs to be addressed (one of the few times I'll say we don't need a User Voice here, already on the priority list).

I got a external windows install of postgres working, could never make the installation within WSL work. Now the rake db:seed fails silently and does not write any data. No one on a OSX device has this issue. I did have to install postgres so pg_dump was available for db:migrate, but I could not run it from the WSL bash shell directly.

@khrome83 Be fair. WSL was released as a beta, as you saw then you checked the box.  It implements only about 70% (iirc) of the Linux syscalls, some of which are not complete, since they do not implement all arguments and modes.  Moreover, things like Unix sockets and socket options are only partially implemented.  The project has only been public for about 4 months, and again, it comes with a bunch of warnings that it is beta software.
The fact that some software works on OS X is barely interesting, since OS X already has a POSIX-related syscall API, and many many *nix tools have been ported to it and recompiled.
But remember, they are recompiled.  WSL is running binaries that are compiled for Linux.  When you compile a program, it compiles against binary Linux libraries.
The difference is pretty simple: It's like saying "Oh, I can play a game on the XBox 360 and on the PS3".  Sure you can, but what you're doing is slagging off a developer who is writing an emulator that runs the game's binaries on PC.
If MS wanted to port Postgres directly to Windows 10, it would work great because they would have engineers sitting there rewriting the parts of the system that do not make sense on Windows, which is very different in a lot of ways (Windows has much better implementation of asynchronous IPC using something called ALPC, which is something like what kdbus was supposed to be before it was abandoned, except not garbage).

@khrome83: I have PG working on the Windows side, and have my Rails app talking to it from WSL. I don't have any helpful links right now, but it is possible.

Install postgresql on windows (prefferably 9.3) - https://www.postgresql.org/download/windows/
set password to postgres
then run 'psql -p 5432 -h localhost -U postgres'
It should be working.

Same problem with 9.3 (latest Windows 10 build updated).

im aloso stuck at this error,
i need to get my postgresql server running...
@jwsloan which build are you using?

@eugen-don I'm running the latest.
I've got pg running in windows, and host: localhost in my database.yml file in my project in WSL.

@jwsloan Any tips how to run rails on windows with postgres?

@alekkowalczyk Let me know what issues you're running into, and I'll certainly try to help. I've been considering starting a repo that has scripts to get you from out-of-the-box wsl to running Rails/nodejs/pheonix/etc... Updating it with new releases until the world is perfect and that repo is no longer needed. :)

I have PostgreSQL installed in my windows, but running bundle install in my rails app fails with 'Gem::Ext::BuildError: ERROR: Failed to build gem native extension.'. Is there a workaround for this?

no comments in 26 days... just wanted to add my +1 on this issue.
Everyone here is working around this issue by running postgresql for Windows as a Windows service instead of pgsql for Linux running in bash for windows?
Thanks!

So I am able to connect via bash using the command @aoslm suggested. But any connection I try to make through node seems unable to find it (or atleast by the name localhost or any variant of it). Anyone gotten a node/postgres project running out of WSL?

👍

+1

Hello! Is @gadkrumholz's summary correct? There is no way to run postgres with Windows on Ubuntu on Bash (Im assuming thats what everyone means when the say WSL)??
I got RVM to work on 'WSL' in order to run a rails app (too many dependency problems to work on Windows).
I initially was directed to install and run Postgres to solve this problem:
=> Booting WEBrick => Rails 4.0.0 application starting in development on http://<IP_ADDRESS>:3000 => Run rails server -hfor more startup options => Ctrl-C to shutdown server [2016-11-18 10:56:14] INFO  WEBrick 1.3.1 [2016-11-18 10:56:14] INFO  ruby 2.0.0 (2015-02-25) [x86_64-linux] [2016-11-18 10:56:14] INFO  WEBrick::HTTPServer#start: pid=12020 port=3000 2016-11-18 11:06:16 -0500 severity=DEBUG, 2016-11-18 11:06:16 -0500 severity=DEBUG, 2016-11-18 11:06:16 -0500 severity=INFO, Started GET "/" for <IP_ADDRESS> at 2016-11-18 11:06:16 -05002016-11-18 11:06:21 -0500 severity=FATAL, PG::ConnectionBad (could not connect to server: Connection refused         Is the server running on host "localhost" (<IP_ADDRESS>) and accepting         TCP/IP connections on port 5432? ):   appsignal (0.10.6) lib/appsignal/rack/listener.rb:13:incall'
Rendered<EMAIL_ADDRESS>(2.7ms)
Rendered<EMAIL_ADDRESS>(4.6ms)
Rendered<EMAIL_ADDRESS>(4.0ms)
Rendered<EMAIL_ADDRESS>within rescues/layout (380.0ms)`
Will the solution of running Postgres on WIndows with the app on WSL work well enough for that?
I actually came across a problem when downloading Postgres on Windows, it simply would not connect/open...
Keeps saying "Failed to connect to the pgAdmin application server. Click here to try again."
I will uninstall and try again. Maybe I missed something.
I am very new to this, I would greatly appreciate any resources or guides that will help. Thanks!

So I made a small guide I've yet to publish to the internet for my students using WSL, I remember some people had issues with the createuser --interactive piece - I believe you need to attach a -h localhost and -P 5432 to that command to get it to work.
I can confirm that I use psql and WSL as daily drivers for development and it works fine.
Heres my excerpt on psql:
1. Go to http://www.enterprisedb.com/products-services-training/pgdownload#windows
2. Download version 9.3.15 - Or if you're feeling dangerous, perhaps a more recent one.
3. Install it, and set password to postgres.
4. Sanity check before going further - open up your bash terminal and enter:
psql -p 5432 -h localhost -U postgres
5. If you get a psql (9.3.x) message - we're on a good path.
6. Open up pgAdmin III, its management tool.
7. Right click on the "PostgreSQL 9.3 (localhost:5432)" and click connect (will prompt for password).
8. Now with that selected, go to "Tools", "Server Configuration", "pg_hba.conf", and change the two checked boxes (the ones with database: all) methods to trust.
9. Now, go to your .bashrc file in terminal, using nano add this to the bottom of the file:
export PGHOST=localhost
10. Now you should be able to type psql in bash. It shouldn't let you login due to not having a user in the psql database. To solve this type:
createuser --interactive yourBashUsernameHere
11. It will prompt you to ask if you are a superuser, you want to say yes to this.
12. But even this isn't enough! Even though we solved psql's default behavior of looking for a user with your bash username, there is a separate issue that it needs a default database for this user as well! To solve this:
createdb yourBashUsernameHere
13. Now, hopefully, when you enter psql into the bash terminal you will get in!

@leafoflegend Thank you for your idea! Unfortunately this did not work for me :/
I got the same 'could not connect to server' issue at step 10 when I typed 'psql'
When I entered the createuser line I got:
root@MSISHADOW:~# createuser --interactive MSISHADOW -h localhost -p 5432
Shall the new role be a superuser? (y/n) Y
Please answer "y" or "n".
Shall the new role be a superuser? (y/n) y
createuser: could not connect to database postgres: FATAL:  role "root" does not exist
root@MSISHADOW:~# createdb MSISHADOW
createdb: could not connect to database template1: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
root@MSISHADOW:~# psql
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

I went ahead and pasted the results of everything after that as well.
This seems like it might just work though! Perhaps I have to exit and then re-open bash or something? Did I enter the right BashUsername? Should it be MSISHADOW or root@MSISHADOW or....???
I will try again in the morning.
Thanks again for your idea though!!

@elirudite - the name must be the user's name so on your instance - root.

@leafoflegend Right! Thanks! Got it figured out by just doing the following
I matched the username and password that was in my app's config/database.yml file with a 'Login Role' as indicated in the PGadmin tool on the Windows side (or just create a new one with all the permissions ticked off then edit the database.yml file)
This is a pretty cool solution as I know might be able to add data from the GUI on Windows to the app, despite it running through WSL so that I dont have to mess with the 'scary' Bash line ;)

@leafoflegend interesting workaround but does not actually solve the issue in this thread. I may use it in the short term though...

@skylarmb It's what we have for the moment! Obviously not a solution to a root problem. And as @Elirudite said, I do enjoy having a GUI interface in Windows as well - it almost seems to make more sense for the user then relying on strictly CLI. Atleast - until Windows can run Ubuntu GUI apps without problems!

Those clusterdb errors 'function not implemented'. One need to start ipc-daemon, cygwinserver and then only run the comand 'pipeline-init -D ../data'?

Curious if anyone has found a work-around for this with Django/psycopg2?

Still unable to install postgres with build 14393.447:
pg_createcluster is not working.
$ LANG=C sudo pg_createcluster 9.3 main --start
Creating new cluster 9.3/main ...
  config /etc/postgresql/9.3/main
  data   /var/lib/postgresql/9.3/main
  locale C
FATAL:  could not create shared memory segment: Function not implemented
DETAIL:  Failed system call was shmget(key=1, size=48, 03600).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/9.3/main"

@bontakun-mk2 14393 probably doesn't have the necessary fixes.  Most of the people on here are using 14971.

@fpqc thank you for information.
I tried build 14971.1000. But still not working.
I wait function implement.

@nickjevershed I just did it. Install the Windows MSI package and then postgresql-client and libpq-dev on WSL. That did the trick. WSL will work as a client and the server is the Windows MSI package.

@chocoelho I can confirm that I can at least do a sanity check with psql -p 5432 -h localhost -U postgres .
Having postgresql-client, postgresql-client-common (not sure if this is need just had it installed so I could use psql), and libpq-dev installed did the trick to interface between the Windows instance of Postgres and Bash commands.
I can also confirm that this works with Rails as well. You will need to explicitly state that your host (localhost), username & password. Will this be a stable platform I have yet to see.
Proof 😄

Could someone clarify what the solution is ? I'm still having trouble. Thx!

@jungerm2

Install Postgresql for Windows (the actual .exe not Linux Bash)
Create User & Password for Postgresql (I use postgres & password for my local development)
Install postgresql-client-common, postgres-client, and libpq-dev (In Bash)
Run a sanity check in Bash to verify that things are working psql -p 5432 -h localhost -U postgres
If you get a psql prompt your good to go, now you can do what you need to do (my particular situation was to get Rails running)
If you have errors well then you may just need to peck away at things and double check that your Postgres server is running in Windows

I created an idea on uservoice, so everyone can upvote this: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/17440639-installing-postgres-fails

You probably don't want to run Postgres inside BashOnWindows anyways because of IO performance.
It's just plain simpler to run https://github.com/garethflowers/postgresql-portable on Windows side and connect via TCP on linux side

@colinrubbert This worked great for me, thanks.
Very minor edit - I think you meant "postgresql-client" not "postgres-client"

thanks @olinbg I will fix it. Must've just been speed typing 😄

Came to this issue, found the workaround, works great 👍

With build 15007 postgres works. The shared memory works.
What doesn't seem to work is the UNIX socket.
It starts and you can connect to it using TCP. To log in you first need to edit pg_hba.conf and enable 'trust' for <IP_ADDRESS>

This bug isn't assigned to anyone, but can be closed per the above comment.
https://blogs.msdn.microsoft.com/commandline/2017/01/09/bash-in-windows-insider-build-15002-many-fixes-but-a-couple-of-bugs/

Along with support for the following shared-memory syscalls which are widely used by a number of Linux tools including PostgreSQL.
shmctl
shmget
shmdt
shmat

Is there a separate issue for the UNIX socket not working?

@arjennienhuis - Thanks for the validation and the post. Can you provide more specifics with what is not working with UNIX sockets? Targeted repro steps are very useful.

arjen@DESKTOP-PVQK426:/mnt/c/Users/Arjen$ sudo apt install postgresql-9.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libpq5 libsensors4 libxslt1.1 postgresql-client-9.5 postgresql-client-common postgresql-common
  postgresql-contrib-9.5 ssl-cert sysstat
Suggested packages:
  lm-sensors locales-all postgresql-doc-9.5 libdbd-pg-perl openssl-blacklist isag
The following NEW packages will be installed:
  libpq5 libsensors4 libxslt1.1 postgresql-9.5 postgresql-client-9.5 postgresql-client-common postgresql-common
  postgresql-contrib-9.5 ssl-cert sysstat
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,978 kB of archives.
After this operation, 20.0 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpq5 amd64 9.5.4-0ubuntu0.16.04 [77.8 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libsensors4 amd64 1:3.4.0-2 [28.4 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxslt1.1 amd64 1.1.28-2.1 [145 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 postgresql-client-common all 173 [28.3 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 postgresql-client-9.5 amd64 9.5.4-0ubuntu0.16.04 [860 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 ssl-cert all 1.0.37 [16.9 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 postgresql-common all 173 [153 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 postgresql-9.5 amd64 9.5.4-0ubuntu0.16.04 [2,980 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 postgresql-contrib-9.5 amd64 9.5.4-0ubuntu0.16.04 [446 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 sysstat amd64 11.2.0-1ubuntu0.1 [243 kB]
Fetched 4,978 kB in 1s (3,139 kB/s)
Selecting previously unselected package libpq5:amd64.
(Reading database ... 25453 files and directories currently installed.)
Selecting previously unselected package libsensors4:amd64...........................................................]
Selecting previously unselected package libxslt1.1:amd64............................................................]
Selecting previously unselected package postgresql-client-common....................................................]
Selecting previously unselected package postgresql-client-9.5.......................................................]
Selecting previously unselected package ssl-cert....................................................................]
Selecting previously unselected package postgresql-common...........................................................]
Adding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'.......................]
Selecting previously unselected package postgresql-9.5.####.........................................................]
Selecting previously unselected package postgresql-contrib-9.5.##...................................................]
Selecting previously unselected package sysstat.######################..............................................]
Processing triggers for libc-bin (2.23-0ubuntu3) ...########################........................................]
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu8) ...
Processing triggers for ureadahead (0.100.0-19) ...
update-alternatives: using /usr/share/postgresql/9.5/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1Adding user postgres to group ssl-cert###############################################################...............]

Creating config file /etc/postgresql-common/createcluster.conf with new version

Creating config file /etc/logrotate.d/postgresql-common with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Creating new cluster 9.5/main ...
  config /etc/postgresql/9.5/main
  data   /var/lib/postgresql/9.5/main
  locale C
  socket /var/run/postgresql
  port   5432
update-alternatives: using /usr/share/postgresql/9.5/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
Progress: [ 96%] [###############################################################################################...]
Creating config file /etc/default/sysstat with new version
Processing triggers for libc-bin (2.23-0ubuntu3) ...###############################################################.]
Processing triggers for systemd (229-4ubuntu8) ...
arjen@DESKTOP-PVQK426:/mnt/c/Users/Arjen$
arjen@DESKTOP-PVQK426:/mnt/c/Users/Arjen$
arjen@DESKTOP-PVQK426:/mnt/c/Users/Arjen$
arjen@DESKTOP-PVQK426:/mnt/c/Users/Arjen$ psql
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
arjen@DESKTOP-PVQK426:/mnt/c/Users/Arjen$ pg_lsclusters
Ver Cluster Port Status Owner    Data directory               Log file
9.5 main    5432 down   postgres /var/lib/postgresql/9.5/main /var/log/postgresql/postgresql-9.5-main.log
arjen@DESKTOP-PVQK426:/mnt/c/Users/Arjen$ sudo lcluster 9.5 main start
The PostgreSQL server failed to start. Please check the log output:
2017-01-17 21:00:49 STD [2474-1] LOG:  database system was shut down at 2017-01-17 20:59:36 STD
2017-01-17 21:00:49 STD [2474-2] LOG:  MultiXact member wraparound protections are now enabled
2017-01-17 21:00:49 STD [2478-1] LOG:  autovacuum launcher started
2017-01-17 21:00:49 STD [2473-1] LOG:  database system is ready to accept connections
2017-01-17 21:00:50 STD [2480-1] [unknown]@[unknown] LOG:  incomplete startup packet
2017-01-17 21:00:50 STD [2483-1] [unknown]@[unknown] LOG:  incomplete startup packet
2017-01-17 21:00:51 STD [2486-1] [unknown]@[unknown] LOG:  incomplete startup packet
2017-01-17 21:00:51 STD [2489-1] [unknown]@[unknown] LOG:  incomplete startup packet
2017-01-17 21:00:52 STD [2492-1] [unknown]@[unknown] LOG:  incomplete startup packet
2017-01-17 21:00:52 STD [2495-1] [unknown]@[unknown] LOG:  incomplete startup packet
2017-01-17 21:00:53 STD [2498-1] [unknown]@[unknown] LOG:  incomplete startup packet
2017-01-17 21:00:54 STD [2501-1] [unknown]@[unknown] LOG:  incomplete startup packet
2017-01-17 21:00:54 STD [2504-1] [unknown]@[unknown] LOG:  incomplete startup packet
2017-01-17 21:00:55 STD [2507-1] [unknown]@[unknown] LOG:  incomplete startup packet
2017-01-17 21:00:55 STD [2510-1] [unknown]@[unknown] LOG:  incomplete startup packet
2017-01-17 21:00:56 STD [2513-1] [unknown]@[unknown] LOG:  incomplete startup packet
arjen@DESKTOP-PVQK426:/mnt/c/Users/Arjen$ psql
psql: could not get socket error status: Invalid argument
arjen@DESKTOP-PVQK426:/mnt/c/Users/Arjen$ sudo sed -i s/md5$/trust/  /etc/postgresql/9.5/main/pg_hba.conf
arjen@DESKTOP-PVQK426:/mnt/c/Users/Arjen$ sudo pg_ctlcluster 9.5 main reload
arjen@DESKTOP-PVQK426:/mnt/c/Users/Arjen$ psql --host <IP_ADDRESS> --user postgres
psql (9.5.4)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.

postgres=#

Which is insecure because it disables all password checking

$ strace psql
...
socket(PF_LOCAL, SOCK_STREAM, 0)        = 4
fcntl(4, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/postgresql/.s.PGSQL.5432"}, 110) = 0
getsockopt(4, SOL_SOCKET, SO_ERROR, 0x7fffca92ae5c, 0x7fffca92ae70) = -1 EINVAL (Invalid argument)
...

and in Linux:
socket(PF_LOCAL, SOCK_STREAM, 0)        = 4
fcntl(4, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/postgresql/.s.PGSQL.5432"}, 110) = 0
getsockopt(4, SOL_SOCKET, SO_ERROR, [0], [4]) = 0

The source says:
			/*
			 * Write ready, since we've made it here, so the connection
			 * has been made ... or has failed.
			 */

			/*
			 * Now check (using getsockopt) that there is not an error
			 * state waiting for us on the socket.
			 */

			if (getsockopt(conn->sock, SOL_SOCKET, SO_ERROR,
						   (char *) &optval, &optlen) == -1)

@arjennienhuis - Thanks for collecting the trace and dissecting it out. Makes the analysis very easy. Good news is that the support for SO_ERROR for unix socket was recently added (thanks @benhillis), but the fix is only available in our dev branch. It is making it's way to the release branch.

#1354 mentioned that. Thanks!

This doesn't work with 15014. Any idea when the fix will be released?

Support for SO_ERROR for unix sockets came in 15019. Can you try with that build?

Same issue here with PostgreSQL 9.3.15.

I'm still "Initializing updates"... 😞

everything seems to work on 15025

Investigate your Postgres SQL Issues with Postgres SQL Support for Linux
Cognegic continually saw as best Postgres authorities who have long history of innovative Postgres database change and association. Our particular authorities in like manner give cutting edge support to our clients and resolve their request by giving top notch help. With proactive help and minute prepared framework we guaranteed unwind you're all issues. We can moreover help you in the course of action of proper checking structure. Beside Postgres Support we moreover give Postgres SQL Support to Windows or PostgreSQL Remote Database Service.
For More Info: https://cognegicsystems.com/
Contact Number: 1-800-450-8670
Email<EMAIL_ADDRESS>Company's  Address-507 Copper Square Drive Bethel Connecticut (USA) 06801

/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data                                                                        initdb: error: cannot be run as root                                             Please log in (using, e.g., "su") as the (unprivileged) user that will           own the server process.                                                          root@localhost:/JAVA/postgresql-13.3# su - postgres                              postgres@localhost:~$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data       The files belonging to this database system will be owned by user "postgres".    This user must also own the server process.                                                                                The database cluster will be initialized with locale "C".                        The default database encoding has accordingly been set to "SQL_ASCII".           The default text search configuration will be set to "english".                                                                                Data page checksums are disabled.                                                                                fixing permissions on existing directory /usr/local/pgsql/data ... ok            creating subdirectories ... ok                                                   selecting dynamic shared memory implementation ... posix                         selecting default max_connections ... 20                                         selecting default shared_buffers ... 400kB                                       selecting default time zone ... UTC                                              creating configuration files ... ok                                              running bootstrap script ... 2021-08-08 10:34:47.950 UTC [31924] FATAL:  could not create shared memory segment: Operation not permitted                          2021-08-08 10:34:47.950 UTC [31924] DETAIL:  Failed system call was shmget(key=1081392, size=56, 03600).                                                          child process exited with exit code 1                                            initdb: removing contents of data directory "/usr/local/pgsql/data"

postgres@localhost:~$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".    This user must also own the server process.                                                                                The database cluster will be initialized with locale "C".                        The default database encoding has accordingly been set to "SQL_ASCII".           The default text search configuration will be set to "english".                                                                                Data page checksums are disabled.                                                                                fixing permissions on existing directory /usr/local/pgsql/data ... ok            creating subdirectories ... ok                                                   selecting dynamic shared memory implementation ... posix                         selecting default max_connections ... 20                                         selecting default shared_buffers ... 400kB                                       selecting default time zone ... UTC                                              creating configuration files ... ok                                              running bootstrap script ... 2021-08-08 10:34:47.950 UTC [31924] FATAL:  could not create shared memory segment: Operation not permitted                          2021-08-08 10:34:47.950 UTC [31924] DETAIL:  Failed system call was shmget(key=1081392, size=56, 03600).                                                          child process exited with exit code 1                                            initdb: removing contents of data directory "/usr/local/pgsql/data"


Memory issues with import/order autofixer in 2.11.0

After upgrading to 2.11.0 my linting process started to fail due to running out of memory. The reason seem to be the autofixer for the import/order rule, because either

running linter without --fix option or
disabling the import/order rules in .eslintrc

makes it working fine again. This is what I see in the console:
<--- Last few GCs --->

[23224:0000012CB4B8B680]   137777 ms: Mark-sweep 1400.1 (1486.3) -> 1400.1 (1486.3) MB, 1995.8 / 0.0 ms
 allocation failure GC in old space requested
[23224:0000012CB4B8B680]   139784 ms: Mark-sweep 1400.1 (1486.3) -> 1400.1 (1455.3) MB, 2006.7 / 0.0 ms
 last resort
[23224:0000012CB4B8B680]   141845 ms: Mark-sweep 1400.1 (1455.3) -> 1400.1 (1455.3) MB, 2059.5 / 0.0 ms
 last resort

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 000000DD8DD1BBE9 <JS Object>
    1: walk(aka walk) [(redacted)\node_modules\typescript-eslint-parser\lib
\node-utils.js:~716] [pc=0000014687C787FF](this=000000DD8DD02241 <undefined>,node=00000374E5FA2321 <a To
kenObject with map<PHONE_NUMBER>E2CAF9>)
    2: arguments adaptor frame: 3->1
    3: InnerArrayForEach(aka InnerArrayForEach) [native array.js:~776] [pc=000001468819EC38](this=000000
DD8DD022...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

I was asked to create this issue with a link back to the PR that introduced autofixer for this rule, so here it is:
https://github.com/benmosher/eslint-plugin-import/pull/908
Just in case, here's my config for the import/order rule:
    "import/order": [
      "error",
      {
        "groups": [
          [
            "builtin",
            "external"
          ],
          [
            "internal",
            "index",
            "sibling",
            "parent"
          ]
        ],
        "newlines-between": "ignore"
      }
    ]

We used autofix order on a large codebase (1000s of files) where it had a failure on every file. First run through was very slow as you would expect, then it was fine after fixing. No memory issues.
How many errors do you have if not fixing?
Can you narrow it down to one file?
If you increase the memory limit for the node process does it eventually complete?

I have assumptions what may cause memory overconsumption, but i want to reproduce the problem.
@JakubJagoda in addition, please provide your node.js version.

It seems like it might be some infinite loop to do with typescript-eslint-parser ?
Can you reproduce with a new file with just 2 import statements? If so you could post the contents of that with changed file paths.. if that doesn’t reproduce, what does?

@lukeapage Here's a sample repo https://github.com/justinanastos/eslint-plugin-import-1086

Also, FWIW, we saw this upgrading from v2.7 to v2.12. I haven't tried to figure out where in between there things went awry.

Lastly, I've used eslint-plugin-import for years and love it. Thank you to all the contributors!

I believe this is tested and resolved by #1137 that was merged 21 days ago. Can the maintainers please cut a release?

As of 2.14.0 released on 2018-08-13 this issue seems to be resolved.

@jakubjagoda is your issue resolved? I’ll be happy to reopen this if not.


Pushing to ECR without logging in first doesn't work

ko 0.15.2 fails to push images to ECR from GitHub actions without first running aws-actions/amazon-ecr-login.
The "Push to registries/Push to ECR" action in this very repo stopped passing since c23121a99aa900b18d957bfc6898193994aa7c14 (https://github.com/ko-build/ko/actions/runs/7109904995/job/19355555999#step:6:18), so that's the likely culprit.

That failure is because of some IAM changes in the account that removed the access to push, most likely. I cannot confirm 100% because I don't have access. But the test has been failing for a long time now

I've had it fail just like that on a private repo, and work with no changes to the aws side after reverting from ko 0.15.2 to ko 0.15.1 or by adding an aws-actions/amazon-ecr-login step before the ko one.

Hmm I see I will take a look
Thanks!


Add examination routes to usePrivateBetaV1RoutesOnly conditional

:tada: This PR is included in version 2.1.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 2.1.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Fix the initial view in the cardboard sandcastle example

Fixes #6964
This broke when we switched to use ion world terrain instead of assets.agi.com.  I'm guessing the ion world terrain is slightly higher in that area so it was trying to push the camera up, but since the camera was set to lookat the model it just put it at a weird angle.  Increasing the height of the balloon fixed the issue.

Thanks for the pull request @hpinkos!

:heavy_check_mark: Signed CLA found.
:grey_question: CHANGES.md was not updated.

If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

[ ] Cesium Viewer works.
[ ] Works in 2D/CV.
[ ] Works (or fails gracefully) in IE11.

I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.
:earth_africa: :earth_americas: :earth_asia:

Looks good, thanks @hpinkos!


@dnd-kit not allowing to prevent dragging items

I'm using this npm package: @dnd-kit https://github.com/clauderic/dnd-kit to be able to drag drop elements up and down in a vertical list. Dragging elements works perfect for me. My problem is that based on some condition I need to block the dragging of the elements at all.
To reproduce the issue you can follow these steps:
$ git clone https://github.com/clauderic/dnd-kit
$ cd dnd-kit
$ git checkout master # currently: d5c4732d7262c773db338850e9b2bb386c938ddf
$ yarn
$ yarn start:storybook

On file: /stories/2 - Presets/Sortable/1-Vertical.story.tsx, just add the highlighted text on the screenshot below...

Here is the added text so you can copy paste:
export const LockedBothAxis = () => (
  <Sortable
    {...props}
    modifiers={[restrictToHorizontalAxis, restrictToVerticalAxis, restrictToWindowEdges]}
  />
);

where you can see my intention is to block the dragging on both axis: horizontal and vertical. Whenever the block condition is true I tried by using those 2 modifiers above:  { restrictToHorizontalAxis, restrictToVerticalAxis } (which doesn't totally work).
Now go to: http://localhost:6006/?path=/story/presets-sortable-vertical--locked-both-axis and try to drag the items.
If you try a short distance dragging then you will notice the dragging doesn't work (so far so good).
My problem is: If you try a long distance dragging (all the way up or down) then you will notice that you can actually drag the items.
What I need: When the user long presses an item, the item gets highlighted but when he tries a short or a long distance dragging, the item doesn't get dragged.
Below you have a demostration of my issue, where I try first a short distance dragging up and down and the item doesn't get dragged (so far so good). But later I try a long distance dragging down and the item gets dragged (my issue)...

Any idea on how to block the dragging at all even if the user does a long distance dragging?

did you find anything?


Websocket disconnection after some hours

After a few hours, some times even just an hour, I get disconnected from the websocket. Since it takes a while to resubscribe to the individual tickers, I would like to avoid disconnections.
Can I do something to prevent this?

Nope. This is a known issue with a) websockets in general and b) Bittrex - but to be fair it happens with every exchange. Sorry, reconnections are the only solution.


Rename, also fix some bugs

Have a couple of threads in progress, figured I'd break this out into its own PR to make reviews easier

Rename *Flatten* -> Canonical / canonicalize
Fix a bug with struct_array_to_arrow where it wasn't doing the conversion deeply (test added)
Bit of a driveby, but implemented the ArrayAccessor for BoolArray (test added)
Add an extension to DataFusion SessionContext to load a Vortex array into a dataframe

I eliminated the flatten_XYZ methods on Array, and instead made the into_canonical() (formerly flatten()) step explicit to make it clear to users of the API what's going on. I realize this might be controversial.
So e.g. before you'd do
array.flatten_primitive()?

and now you'd do
array.into_canonical()?.into_primitive()?

In general, I feel like users of the API are going to want a clean onramp(s) into the vortex world, and then a clean offramp back to Arrow to be exported to other tools. Canonical is the closest thing we have to the interchange for things that want to exit the Vortex world. It's a little bit weird that Canonical still needs to be deeply flattened to get back to Arrow, idk if there should be another type that deeply flattens but keeps everything in Vortex land.


[BUG] need to handle the failure during allocate multiple IPs for a single pod, or it will exhausted the whole IP Pool.

Kube-OVN Version
v.1.12.17 and master
Kubernetes Version
v1.27
Operation-system/Kernel Version
"Ubuntu 20.04.6 LTS" / 5.4.0-186-generic
Description
it looks like no handling for the failure of IP allocation during create the VPC GW pod, and the whole External IP Pool get exhausted by this problem.
after done some research, I found out the root cause looks like below:
pod.go
// do the same thing as add pod
func (c *Controller) reconcileAllocateSubnets(cachedPod, pod *v1.Pod, needAllocatePodNets []*kubeovnNet) (*v1.Pod, error) {
	namespace := pod.Namespace
	name := pod.Name
	klog.Infof("sync pod %s/%s allocated", namespace, name)

	isVMPod, vmName := isVMPod(pod)
	podType := getPodType(pod)
	podName := c.getNameByPod(pod)
	// todo: isVmPod, getPodType, getNameByPod has duplicated logic

	// Avoid create lsp for already running pod in ovn-nb when controller restart
	for _, podNet := range needAllocatePodNets {
		// the subnet may changed when alloc static ip from the latter subnet after ns supports multi subnets
		v4IP, v6IP, mac, subnet, err := c.acquireAddress(pod, podNet)
		if err != nil {
			c.recorder.Eventf(pod, v1.EventTypeWarning, "AcquireAddressFailed", err.Error())
			klog.Error(err)
			return nil, err  <<<<<<<< here, need to release those allocated IP address in previous loop
		}
                ...
       }

an vpc-gw pod info:
root@master:~# kubectl describe pod vpc-nat-gw-tanant1-pro1-vpc1-net1-gw-0 -n kube-system
Name:             vpc-nat-gw-tanant1-pro1-vpc1-net1-gw-0
Namespace:        kube-system
Priority:         0
Service Account:  default
Node:             worker2/<IP_ADDRESS>
Start Time:       Fri, 21 Jun 2024 11:13:32 +0000
Labels:           app=vpc-nat-gw-tanant1-pro1-vpc1-net1-gw
                  controller-revision-hash=vpc-nat-gw-tanant1-pro1-vpc1-net1-gw-658dfcff4
                  ovn.kubernetes.io/vpc-nat-gw=true
                  statefulset.kubernetes.io/pod-name=vpc-nat-gw-tanant1-pro1-vpc1-net1-gw-0
Annotations:      k8s.v1.cni.cncf.io/network-status:
                    [{
                        "name": "kube-ovn",
                        "interface": "eth0",
                        "ips": [
                            "<IP_ADDRESS>"
                        ],
                        "mac": "00:00:00:16:07:58",
                        "default": true,
                        "dns": {},
                        "gateway": [
                            "<IP_ADDRESS>"
                        ]
                    },{
                        "name": "kube-system/ovn-vpc-external-network",
                        "interface": "net1",
                        "ips": [
                            "<IP_ADDRESS>"
                        ],
                        "mac": "02:26:74:5d:03:a3",
                        "dns": {}
                    }]

Steps To Reproduce
create and delete vpc nat gate multiple times
Current Behavior
the external IP CIDR get exhausted by this problem
Expected Behavior
nice handling for the IP allocating/releasing to avoid such a problem.

can some expert help fix this issue as I have no authority to do it,
many thanks

please attach the err log in the kube-ovn-controller pod about the nat gw pod allocate ip

701 I0619 12:07:04.058569       6 ipam.go:60] allocate v4 <IP_ADDRESS>, v6 , mac  for kube-system/vpc-nat-gw-gw1-vpc-1-0 from subnet ovn-vpc-external-network
702 I0619 12:07:04.071551       6 ipam.go:72] allocating static ip <IP_ADDRESS> from subnet net1-vpc-1
703 E0619 12:07:04.072121       6 pod.go:1762] failed to get static ip <IP_ADDRESS>, mac , subnet net1-vpc-1, err NoAvailableAddress
704 I0619 12:07:04.072830       6 ipam.go:72] allocating static ip <IP_ADDRESS> from subnet ovn-default
705 E0619 12:07:04.073320       6 ipam.go:89] failed to allocate static ip <IP_ADDRESS> for kube-system/vpc-nat-gw-gw1-vpc-1-0
706 E0619 12:07:04.073525       6 pod.go:1762] failed to get static ip <IP_ADDRESS>, mac , subnet ovn-default, err AddressOutOfRange
707 E0619 12:07:04.073788       6 pod.go:620] AddressOutOfRange
708 E0619 12:07:04.074250       6 pod.go:405] error syncing 'kube-system/vpc-nat-gw-gw1-vpc-1-0': AddressOutOfRange, requeuing
709 I0619 12:07:04.074177       6 event.go:298] Event(v1.ObjectReference{Kind:"Pod", Namespace:"kube-system", Name:"vpc-nat-gw-gw1-vpc-1-0", UID:"d61e58b5-c8f8-4f79-86cc-4e6d8724f475", AP      IVersion:"v1", ResourceVersion:"2632", FieldPath:""}): type: 'Warning' reason: 'AcquireAddressFailed' AddressOutOfRange
710 I0619 12:07:04.080417       6 pod.go:550] handle add/update pod kube-system/vpc-nat-gw-gw1-vpc-1-0
711 I0619 12:07:04.083914       6 pod.go:346] enqueue update pod kube-system/vpc-nat-gw-gw1-vpc-1-0
712 I0619 12:07:04.086506       6 pod.go:607] sync pod kube-system/vpc-nat-gw-gw1-vpc-1-0 allocated
713 I0619 12:07:04.087707       6 ipam.go:60] allocate v4 <IP_ADDRESS>, v6 , mac  for kube-system/vpc-nat-gw-gw1-vpc-1-0 from subnet ovn-vpc-external-network
714 I0619 12:07:04.097194       6 ipam.go:72] allocating static ip <IP_ADDRESS> from subnet net1-vpc-1
715 E0619 12:07:04.097443       6 pod.go:1762] failed to get static ip <IP_ADDRESS>, mac , subnet net1-vpc-1, err NoAvailableAddress
716 I0619 12:07:04.097556       6 ipam.go:72] allocating static ip <IP_ADDRESS> from subnet ovn-default
717 E0619 12:07:04.097627       6 ipam.go:89] failed to allocate static ip <IP_ADDRESS> for kube-system/vpc-nat-gw-gw1-vpc-1-0
718 E0619 12:07:04.097700       6 pod.go:1762] failed to get static ip <IP_ADDRESS>, mac , subnet ovn-default, err AddressOutOfRange
719 E0619 12:07:04.097851       6 pod.go:620] AddressOutOfRange
720 E0619 12:07:04.097949       6 pod.go:405] error syncing 'kube-system/vpc-nat-gw-gw1-vpc-1-0': AddressOutOfRange, requeuing
721 I0619 12:07:04.098040       6 pod.go:550] handle add/update pod kube-system/vpc-nat-gw-gw1-vpc-1-0
722 I0619 12:07:04.098105       6 event.go:298] Event(v1.ObjectReference{Kind:"Pod", Namespace:"kube-system", Name:"vpc-nat-gw-gw1-vpc-1-0", UID:"d61e58b5-c8f8-4f79-86cc-4e6d8724f475", AP      IVersion:"v1", ResourceVersion:"2633", FieldPath:""}): type: 'Warning' reason: 'AcquireAddressFailed' AddressOutOfRange
723 I0619 12:07:04.101424       6 pod.go:607] sync pod kube-system/vpc-nat-gw-gw1-vpc-1-0 allocated
724 I0619 12:07:04.101533       6 ipam.go:60] allocate v4 <IP_ADDRESS>, v6 , mac  for kube-system/vpc-nat-gw-gw1-vpc-1-0 from subnet ovn-vpc-external-network
725 I0619 12:07:04.107169       6 pod.go:346] enqueue update pod kube-system/vpc-nat-gw-gw1-vpc-1-0
726 I0619 12:07:04.107456       6 ipam.go:72] allocating static ip <IP_ADDRESS> from subnet net1-vpc-1
727 E0619 12:07:04.107559       6 pod.go:1762] failed to get static ip <IP_ADDRESS>, mac , subnet net1-vpc-1, err NoAvailableAddress
728 I0619 12:07:04.107574       6 ipam.go:72] allocating static ip <IP_ADDRESS> from subnet ovn-default
729 E0619 12:07:04.107581       6 ipam.go:89] failed to allocate static ip <IP_ADDRESS> for kube-system/vpc-nat-gw-gw1-vpc-1-0
730 E0619 12:07:04.107585       6 pod.go:1762] failed to get static ip <IP_ADDRESS>, mac , subnet ovn-default, err AddressOutOfRange
731 E0619 12:07:04.107645       6 pod.go:620] AddressOutOfRange
732 E0619 12:07:04.108065       6 pod.go:405] error syncing 'kube-system/vpc-nat-gw-gw1-vpc-1-0': AddressOutOfRange, requeuing
733 I0619 12:07:04.108083       6 pod.go:550] handle add/update pod kube-system/vpc-nat-gw-gw1-vpc-1-0
734 I0619 12:07:04.107846       6 event.go:298] Event(v1.ObjectReference{Kind:"Pod", Namespace:"kube-system", Name:"vpc-nat-gw-gw1-vpc-1-0", UID:"d61e58b5-c8f8-4f79-86cc-4e6d8724f475", AP      IVersion:"v1", ResourceVersion:"2642", FieldPath:""}): type: 'Warning' reason: 'AcquireAddressFailed' AddressOutOfRange
735 I0619 12:07:04.110791       6 pod.go:607] sync pod kube-system/vpc-nat-gw-gw1-vpc-1-0 allocated
736 I0619 12:07:04.110947       6 ipam.go:60] allocate v4 <IP_ADDRESS>, v6 , mac  for kube-system/vpc-nat-gw-gw1-vpc-1-0 from subnet ovn-vpc-external-network
737 I0619 12:07:04.116781       6 ipam.go:72] allocating static ip <IP_ADDRESS> from subnet net1-vpc-1
738 E0619 12:07:04.116801       6 pod.go:1762] failed to get static ip <IP_ADDRESS>, mac , subnet net1-vpc-1, err NoAvailableAddress
739 I0619 12:07:04.116809       6 ipam.go:72] allocating static ip <IP_ADDRESS> from subnet ovn-default
740 E0619 12:07:04.116901       6 ipam.go:89] failed to allocate static ip <IP_ADDRESS> for kube-system/vpc-nat-gw-gw1-vpc-1-0
741 E0619 12:07:04.116916       6 pod.go:1762] failed to get static ip <IP_ADDRESS>, mac , subnet ovn-default, err AddressOutOfRange
742 E0619 12:07:04.117040       6 pod.go:620] AddressOutOfRange

err： failed to get static ip <IP_ADDRESS>, mac , subnet ovn-default, err AddressOutOfRange 719 E0619 12:07:04.097851 6 pod.go:620] AddressOutOfRange
please attatch kubectl get subnet  details:

the root cause should be identified as above, we need to handle the exception gracefully.
I have rebuild my setup, so paste the subnet and VPC's definition as below:
kind: Vpc
apiVersion: kubeovn.io/v1
metadata:
  name: vpc-1
spec:
  staticRoutes:
    - cidr: <IP_ADDRESS>/0
      nextHopIP: <IP_ADDRESS>
      policy: policyDst
  namespaces:
    - ns1
    - ns2
    - ns3
    - ns4
    - ns5
---
kind: Subnet
apiVersion: kubeovn.io/v1
metadata:
  name: net1-vpc-1
spec:
  vpc: vpc-1
  cidrBlock: <IP_ADDRESS>/24
  protocol: IPv4
  excludeIps:
    - <IP_ADDRESS>
  namespaces:
    - ns1

per the log above,it looks exist another problem(as you mentioned ), the controller shouldn't allocate the "<IP_ADDRESS>" for ovn-default subnet

where is your <IP_ADDRESS>/24 subnet ???

where is your <IP_ADDRESS>/24 subnet ???

could you help take a deep look at the problem?   it should be easy to reproduce with my configuration above.
my testbed got broken by the problem and I have rebuild it, so you cannot see  the subnet in my current setup.
many thanks

I have reproduced it with a new VPC named "vpc-3" with related log files
could you help take a look?
many thanks
1.12.7-IP-Allocation-bug.zip

where is your <IP_ADDRESS>/24 subnet ???

sorry,  I think when you get subnet: it show all the subnet, but i do not find the <IP_ADDRESS>/24 subnet

where is your <IP_ADDRESS>/24 subnet ???

sorry, I think, when you get subnet: it shows all the subnets, but, i do not find the <IP_ADDRESS>/24 subnet

could you refer to my reply above : https://github.com/kubeovn/kube-ovn/issues/4210#issuecomment-2185711409

it looks like the problem  is obviously, can we help fix it if possible?
many thanks

you do not have the vpc subnet <IP_ADDRESS>/24, if you use the <IP_ADDRESS>.254,  you should create it.
if you use vpc3 subnet, I think you should use <IP_ADDRESS>.

"if you use vpc3 subnet, I think you should use <IP_ADDRESS>."
yes, I'm using <IP_ADDRESS> for vpc3, please refer to vpc3(rather than vpc1) related configuration/debug info in the tar ball
thanks

hi @zhangzujian, it seems IPAM has a problem ?


How critical is support for Internet Explorer (IE)?

@almarklein commented on Mon Oct 30 2017
The use of IE is in its decline. To what extend is still necessary to support it? There are several features that we can't use, making the PyScript bulkier/slower and even prevents certain functionality.
My feeling is that we should probably keep supporting it for now, but this issue will become increasingly relevant.
Examples:

Variable destructuring: [a, b] = ...., though this also fails on Safari.
We cannot do a = 'foo'; {a: 3}. Well, we  could translate that to a = 'foo'; {[a]: 2}, but that does not work on bloody IE.

@almarklein commented on Fri Nov 03 2017
For the second bulletpoint, the implication is that we cannot do something like this in Flexx.:
key = 'keyname'
new_dict = {key: 42}

The dict issue is resolved by #17. I think I'd like to try supporting IE for the time being. I care less about IE for Flexx, but PScript is a more general (low level) tool.


Upgrade Process Fails When Software Manager is Busy

Issue Summary
The perform_upgrade function in the pan-os-upgrade script encounters an error and exits when attempting to install a new PAN-OS version while the software manager is already in use.
Detailed Description
Behavior: When the script tries to upgrade the PAN-OS version using firewall.software.install, it fails if the software manager on the device is currently in use. The script then raises a PanDeviceError and exits.
Error Message:
PanDeviceError: Device [serial] attempt to install version [version] failed: ['Failed to install [version] with the following errors.\nThe software manager is currently in use. Please try again later.\nFailed to install version [version] type panos\n\n']

Expected Behavior: The script should handle this scenario gracefully by retrying the installation after a brief wait period.
Steps to Reproduce
Run the pan-os-upgrade script to upgrade a PAN-OS firewall.
If the software manager on the firewall is busy, observe the script failing with the mentioned error.
Suggested Fix
Improve the error handling in the perform_upgrade function to catch PanDeviceError and implement a retry mechanism. The script should wait for a configurable amount of time and then retry the upgrade process a few times before finally failing.
Impact
This bug impedes the ability of the script to reliably perform upgrades, especially in environments where the software manager might be frequently busy.
Request for Assistance
We are looking for contributions to:

Analyze and confirm the bug.
Propose and implement a solution to handle busy software manager scenarios.
Test the solution in different conditions to ensure reliability.

This was resolved in commit 66822d1e5515f5e08859216fca6542aab309f984


Add onboard cert and onboard key to assets

We include a default onboard cert and (embedded in it as the CN) onboarding key. Of course any distro build can change these, but these are the default and often are used.
To make it simple for default users (basic getting started flow), we should include the cert and the key in the assets.

@eriknordmark thanks. Do you know if I got the triggers and cloning right?

Sorry to come to this rather late, but... well... actually ;-)

I think "fashionably late" is for parties, not PRs. 😆

Actually I see no reason for these to be uploaded -- in fact, I'm kind of a big fan of the # of assets to remain as small as possible (actually working on reducing the # for iPXE boots). So what is the real value here @deitch ?

Think of the user flow when I just want to provision and onboard a device:

I take standard vanilla eve right from assets or from the equivalently-tagged docker image
I flash it to a device drive, or iPXE it, etc.
I go to a controller and it asks me for the serial - which I provide - and the onboard cert or onboard key. And I look and say, "onboard key? where is that? How do I get it?"

Sure, customers and OEMs might (should) very well override it, but they also might have a different build of lots of things. For the basic getting started case - which the assets and hub image are most helpful for - I am missing a piece of information. Telling them, "look in the code" or "go ask in Slack" or "read some docs" doesn't cut it. In any case, we don't have docs that have it, and they could be out of sync, as each build could have its own cert, or at least be changed a few times between builds, which is the definition of an asset that is tied to a release.
In sum: one more step in simplifying basic usage for users. Discussed at length with @kgiori

I think "fashionably late" is for parties, not PRs. 😆

LOL! But ain't it a party on every PR we have?

I go to a controller and it asks me for the serial - which I provide - and the onboard cert or onboard key. And I look and say, "onboard key? where is that? How do I get it?"

See, that's where I agree with premise, but disagree with the solution. I think the right solution is to make it visible to the end user during the runtime steps, not hide it inside a set of assets.
I mean -- I'm open to be convinced otherwise -- but for now -- I'd rather not merge it until that happens.

See, that's where I agree with premise, but disagree with the solution. I think the right solution is to make it visible to the end user during the runtime steps, not hide it inside a set of assets.

I have no issue with that, as long as it is:

easy for one to find
tied to the specific release (since each release can change it)

Where would you want it, and how would the process work?

Where would you want it, and how would the process work?

I'd flip it on you and ask this @deitch -- how do you expect the process you're proposing to work? IOW, ok you've got the certificate published in assets -- now what? How does the workflow for anyone change after that?

@deitch any plans to continue this work or we can close?

Close this due no activity.


Unable to change theme colors ,tried every but it didn't worked

Provide a description of requested docs changes
Please describe how the theme colors and fonts can be changed
Able to fix / change the documentation?

[ ] Yes
[X] No

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Provide a description of requested docs changes
Please describe how the theme colors and fonts can be changed
Able to fix / change the documentation?
* [ ]  Yes

* [x]  No

Code of Conduct
* [x]  I agree to follow this project's Code of Conduct

You can check these tutorials for find out:
https://www.youtube.com/watch?v=dwj2snJegYU
https://www.youtube.com/watch?v=wwmzrgrXdyo
https://www.youtube.com/watch?v=uCxPb_39TNg

@samberrry i watched this tutorials, but i can't find index.vue file to modify


Propagate env vars to sudo invocations.

"Merging is blocked", is it caused by the force push?

msuozzo force-pushed the patch-1 branch from ff0be26 to b4754dd yesterday


Bisphenols

Some plot fixes

I'm going to merge this because I want to fix some plots in a different branch!

You maniac!


feat(api): linalg

@dcvz could you please remind me why this was closed?

@minghuaw no big reason, it was just pending some other functionality and closed it in the meantime. Plan was to continue from here but didn’t wanna block it as “mine”.

Re-opening to continue working on linalgs

Dependencies

[ ] #76


chore(build): Cleanup firebase build

Checklist

Issue number for this PR: #nnn (required)
Docs included?: (yes/no; required for all API/functional changes)
Test units included?: (yes/no; required)
In a clean directory, yarn install, yarn test run successfully? (yes/no; required)

Description

Since we use @firebase/* as dependencies now, firebase should only be a dev dependency (we use the development version of the lib it in the tests)
The typings test should use @firebase/app
Use the module import from @firebase/app in core

Code sample
n/a

@davideast I'll cut rc.9 after we merge this.

Might be related to #1647

someone, please help me
i have error in my project, can you check my project ?
and tell me, what's wrong with my project ?


avoid duplicate jpeek analysis

@rultor release, tag is 0.6.9

@rultor release, tag is 0.6.9

@yegor256 OK, I will release it now. Please check the progress here

@rultor

@rultor

@yegor256 I'm sorry, I don't understand you :( Check this page and try again please


Reconnect fix

There are a couple of problems with the current implementation of error handling in the websockets connection process:
Problem 1: Only a 404 HTTP error return code generated an InvalidStatusCode exception, so all other error codes did not generate an exception and skipped the backoff logic.  (All status codes except 301, 302, 303, 307, 308 and 101 will cause an exception in websockets lib, i.e. redirects and protocol change). Solution: generate exception for all HTTP error codes.
Problem 2: When the exceptions are raised, the control returns to outer loop which will renegotiate the URL, but there is no backoff in this process since that was skipped in websockets. Solution: add backoff delay to the outer loop where the exception is now caught.

Code needs testing, so probably not final.

Code is now tested.

Back in your hands @droserasprout


Ensure containers run as non-root

Either through Dockerfile spec (if possible) or CronJob/Job specs.

Dockerfile is updated to support this but we probably need to just test to make sure it runs correctly in K8s before closing this off.

Fixed by #14


Support async iteration

Hello! I've noticed that streams created with this library do not support async iteration. This appears to be because it depends on readable-stream v2.x.x, and Symbol.asyncIterator was added to that library in v3.x.x, when it started supporting Node v10. I noticed in #21 that there was reluctance to upgrade to readable-stream v3.x.x, but that was more than a year and a half ago.
Would you be open to a PR that updates the dependency? Or does that issue still remain? Alternatively, any suggestions for how I might support async iteration in streams created by this library?

Async iteration can easily be fixed by:
const legacyStream = from2([opts], read)
const modernStream = (new Readable({objectMode:true}).wrap(legacyStream))